From: cash Date: Thu, 10 Dec 2009 12:13:38 +0000 (+0000) Subject: closes #1244 - checking whether file exists before deleting it in cache X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=7231fce56043f7244b5c147de8033c2b76b922bb;p=lorea%2Felgg.git 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 --- 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() {