From b09fac7f9b737901007029d6e93ec63ca94ec2ef Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Mon, 16 Mar 2009 04:31:53 +0000 Subject: [PATCH] BUGFIX: Don't throw an error if a non-existent cache file is cleared git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73089 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- core/Object.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/Object.php b/core/Object.php index 8ec9d6f9f..f882850b1 100755 --- a/core/Object.php +++ b/core/Object.php @@ -685,7 +685,8 @@ abstract class Object { if($ID) $cacheName .= '_' . $ID; if(count($arguments)) $cacheName .= '_' . implode('_', $arguments); - unlink(TEMP_FOLDER . '/' . $this->sanitiseCachename($cacheName)); + $file = TEMP_FOLDER . '/' . $this->sanitiseCachename($cacheName); + if(file_exists($file)) unlink($file); } /**