mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 02:44:27 +02:00
added check if for file_exists() to Smarty::_read_file()
This commit is contained in:
@@ -1704,9 +1704,9 @@ class Smarty
|
||||
*/
|
||||
function _read_file($filename)
|
||||
{
|
||||
if ($fd = @fopen($filename, 'rb')) {
|
||||
if ( file_exists($filename) && ($fd = @fopen($filename, 'rb')) ) {
|
||||
$contents = ($size = filesize($filename)) ? fread($fd, $size) : '';
|
||||
fclose($fd);
|
||||
fclose($fd);
|
||||
return $contents;
|
||||
} else {
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user