Home » Caching » Cache » Bug #2749
cache->flush reports error when called second time
Details
| 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) |
Comments
[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