cvs: smarty / NEWS /libs Smarty.class.php
[email protected] ("Messju Mohr") Sat, 31 Dec 2005 19:17:05 -0000
| Newsgroups | php.smarty.cvs |
|---|---|
| Message-ID | <cvsmessju1136056625@cvsserver> |
messju Sat Dec 31 19:17:05 2005 EDT
Modified files:
/smarty/libs Smarty.class.php
/smarty NEWS
Log:
fixed incompatible use of fread() in Smarty::_read_file()
it choke on php-5.1.1 and later.
thanks to andig for pointing this out.
http://cvs.php.net/viewcvs.cgi/smarty/libs/Smarty.class.php?r1=1.522&r2=1.523&diff_format=u
Index: smarty/libs/Smarty.class.php
diff -u smarty/libs/Smarty.class.php:1.522 smarty/libs/Smarty.class.php:1.523
--- smarty/libs/Smarty.class.php:1.522 Wed Dec 14 14:53:55 2005
+++ smarty/libs/Smarty.class.php Sat Dec 31 19:17:04 2005
@@ -30,7 +30,7 @@
* @version 2.6.12-dev
*/
-/* $Id: Smarty.class.php,v 1.522 2005/12/14 14:53:55 mohrt Exp $ */
+/* $Id: Smarty.class.php,v 1.523 2005/12/31 19:17:04 messju Exp $ */
/**
* DIR_SEP isn't used anymore, but third party apps might
@@ -1715,7 +1715,10 @@
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 {
http://cvs.php.net/viewcvs.cgi/smarty/NEWS?r1=1.522&r2=1.523&diff_format=u
Index: smarty/NEWS
diff -u smarty/NEWS:1.522 smarty/NEWS:1.523
--- smarty/NEWS:1.522 Wed Dec 21 18:09:23 2005
+++ smarty/NEWS Sat Dec 31 19:17:05 2005
@@ -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)