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

Bug #2749 cache->flush reports error when called second time
Submitted: 2004-11-13 16:51 UTC
From: rbell01824 at earthlink dot net Assigned: dufuz
Status: Closed Package: Cache
PHP Version: 4.3.8 OS: XP
Roadmaps: (Not assigned)    
Subscription  


 [2004-11-13 16:51 UTC] rbell01824 at earthlink dot net
Description: ------------ $cache->flush() reports error when called on a cache that has already been flushed. Should check that the directory exists before attempting to delete or swallow the error so it does not reach the user. Reproduce code: --------------- r_debug("// Open cache"); $cache = new Cache('file', array('cache_dir'=>RJB_CACHE_DIR)); r_debug("// Flush"); $cache->flush(); r_debug("// Flush"); $cache->flush(); // causes error message Expected result: ---------------- No error message Actual result: -------------- Unable to open directory error message

Comments

 [2004-12-14 08:28 UTC] dufuz
It's kinda fixed, but I'm not happy with the way we handle errors and such, and there are some issues I introduced with my fix, so I'll finish that up very soon and make a release :)
 [2004-12-14 09:16 UTC] dufuz
This bug has been fixed in CVS. In case this was a documentation problem, the fix will show up at the end of next Sunday (CET) on pear.php.net. In case this was a pear.php.net website problem, the change will show up on the website in short time. Thank you for the report, and for helping us make PEAR better.