PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Caching » Cache » Bug #2749

cache->flush reports error when called second time

Details

Submitted2004-11-13 16:51 UTC
Fromrbell01824 at earthlink dot net
Assigneddufuz
StatusClosed
PackageCache
PHP Version4.3.8
OSXP
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