aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-12-10 12:13:38 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-12-10 12:13:38 +0000
commit7231fce56043f7244b5c147de8033c2b76b922bb (patch)
tree7827ef31ba488a3ff8404290d23876af9dc1db8e /engine
parent57d19098d332d768cf11316c48a754dc5761f681 (diff)
downloadelgg-7231fce56043f7244b5c147de8033c2b76b922bb.tar.gz
elgg-7231fce56043f7244b5c147de8033c2b76b922bb.tar.bz2
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
Diffstat (limited to 'engine')
-rw-r--r--engine/lib/cache.php7
1 files changed, 5 insertions, 2 deletions
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() {