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
This commit is contained in:
Sam Minnee 2009-03-16 04:31:53 +00:00
parent 67a1c6cda3
commit b09fac7f9b

View File

@ -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);
}
/**