summaryrefslogtreecommitdiffstats
path: root/admin/purgecache.php
diff options
context:
space:
mode:
Diffstat (limited to 'admin/purgecache.php')
-rw-r--r--admin/purgecache.php5
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);
}
}
}