From 267a9c41d7ae4707d92c625eb67ff8680b701706 Mon Sep 17 00:00:00 2001 From: messju Date: Thu, 20 Mar 2003 09:20:24 +0000 Subject: [PATCH] removed notice of undefined var in _rm_auto() --- NEWS | 1 + libs/Smarty.class.php | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index dfbbbfac..d70da3fe 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,4 @@ + - removed notice of undefined var in _rm_auto() (messju) - added warning message when an array is passed as the "checked" value of html_radios (Monte) - fixed errormessage in _compile_smarty_ref() (messju) diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index 9e72ad75..5c0952b9 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -2142,11 +2142,12 @@ class Smarty } else { // remove matching file names $handle = opendir($auto_base); + $res = true; while (false !== ($filename = readdir($handle))) { if($filename == '.' || $filename == '..') { continue; } elseif (substr($auto_base . DIR_SEP . $filename,0,strlen($tname)) == $tname) { - $this->_unlink($auto_base . DIR_SEP . $filename, $exp_time); + $res &= (bool)$this->_unlink($auto_base . DIR_SEP . $filename, $exp_time); } } }