Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.8.3

Bug #18679 _cleanDir missing files
Submitted: 2011-07-22 04:11 UTC
From: tama Assigned: tacker
Status: Closed Package: Cache_Lite (version 1.7.11)
PHP Version: Irrelevant OS: Irrelevant
Roadmaps: (Not assigned)    
Subscription  


 [2011-07-22 04:11 UTC] tama (Tama Pugsley)
Description: ------------ If the cache folder contains a directory or filename that evaluates to false in PHP (e.g. 0) the _cleanDir method will skip files. Test script: --------------- It's an easy fix: Index: Lite.php =================================================================== --- Lite.php (revision xxx) +++ Lite.php (working copy) @@ -624,7 +624,7 @@ return $this->raiseError('Cache_Lite : Unable to open cache directory !', -4); } $result = true; - while ($file = readdir($dh)) { + while(($file = readdir($dh)) !== false) { if (($file != '.') && ($file != '..')) { if (substr($file, 0, 6)=='cache_') { $file2 = $dir . $file;

Comments

 [2011-07-22 15:21 UTC] tacker (Markus Tacker)
-Status: Open +Status: Verified -Operating System: Debian +Operating System: Irrelevant -Assigned To: +Assigned To: tacker
 [2011-08-15 18:44 UTC] tacker (Markus Tacker)
-Status: Verified +Status: Closed
Thank you for your bug report. This issue has been fixed in the latest released version of the package, which you can download at http://pear.php.net/get/