diff --git a/NEWS b/NEWS index 8bb0242f..428e7c58 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,4 @@ + - cleaned up calls to readdir() (messju) - fixed bug with passing multiple modifiers to a parameter (Monte) - updated docs for html_checkboxes, html_options and html_radios (messju) diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index ee387532..9e72ad75 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -2142,7 +2142,7 @@ class Smarty } else { // remove matching file names $handle = opendir($auto_base); - while ($filename = readdir($handle)) { + while (false !== ($filename = readdir($handle))) { if($filename == '.' || $filename == '..') { continue; } elseif (substr($auto_base . DIR_SEP . $filename,0,strlen($tname)) == $tname) { @@ -2168,7 +2168,7 @@ class Smarty if($handle = @opendir($dirname)) { - while (null != ($entry = readdir($handle))) { + while (false !== ($entry = readdir($handle))) { if ($entry != '.' && $entry != '..') { if (@is_dir($dirname . DIR_SEP . $entry)) { $this->_rmdir($dirname . DIR_SEP . $entry, $level + 1, $exp_time);