diff --git a/NEWS b/NEWS index d4f666de..61adbc8f 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,4 @@ + - make Smarty::_read_file() work on latest php (messju) - fixed improper tokenization of certain inline math expressions (boots) Version 2.6.11 (Dec 14, 2005) diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index 327ad502..006bcfb9 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -1715,7 +1715,10 @@ class Smarty function _read_file($filename) { if ( file_exists($filename) && ($fd = @fopen($filename, 'rb')) ) { - $contents = ($size = filesize($filename)) ? fread($fd, $size) : ''; + $contents = ''; + while (!feof($fd)) { + $contents .= fread($fd, 8192); + } fclose($fd); return $contents; } else {