mirror of
https://github.com/smarty-php/smarty.git
synced 2026-02-13 10:30:10 +01:00
removed unused functionality to load a subset of lines from a file in
Smarty::_read_file() additionally removed a warning that is emitted since php-4.3.5 when fread() is called on an empty file (with filesize()==0). thanks to Andreas Streichardt who pointed this out.
This commit is contained in:
@@ -240,7 +240,7 @@ class Config_File {
|
||||
return false;
|
||||
}
|
||||
|
||||
$contents = fread($fp, filesize($config_file));
|
||||
$contents = ($size = filesize($config_file)) ? fread($fp, $size) : '';
|
||||
fclose($fp);
|
||||
|
||||
$this->_config_data[$config_file] = $this->parse_contents($contents);
|
||||
|
||||
Reference in New Issue
Block a user