From 7231fce56043f7244b5c147de8033c2b76b922bb Mon Sep 17 00:00:00 2001 From: cash Date: Thu, 10 Dec 2009 12:13:38 +0000 Subject: closes #1244 - checking whether file exists before deleting it in cache git-svn-id: http://code.elgg.org/elgg/trunk@3752 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/cache.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'engine/lib') diff --git a/engine/lib/cache.php b/engine/lib/cache.php index fd13bf3c7..df7b1e525 100644 --- a/engine/lib/cache.php +++ b/engine/lib/cache.php @@ -389,8 +389,11 @@ class ElggFileCache extends ElggCache { */ public function delete($key) { $dir = $this->get_variable("cache_path"); - - return unlink($dir.$key); + + if (file_exists($dir.$key)) { + return unlink($dir.$key); + } + return TRUE; } public function clear() { -- cgit v1.2.3