diff options
Diffstat (limited to 'admin/purgecache.php')
-rw-r--r-- | admin/purgecache.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/admin/purgecache.php b/admin/purgecache.php index 7b01c97..b020758 100644 --- a/admin/purgecache.php +++ b/admin/purgecache.php @@ -13,8 +13,9 @@ if (isset($_POST['purge'])) { continue; } - if (filemtime($dir . DIRECTORY_SEPARATOR . $filename) < time()) { - @unlink($dir . DIRECTORY_SEPARATOR . $filename); + $file = $dir . DIRECTORY_SEPARATOR . $filename; + if (is_file($file) && filemtime($file) < time()) { + unlink($file); } } } |