summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--system/application/controllers/file.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/system/application/controllers/file.php b/system/application/controllers/file.php
index 37658ea19..1d4a369f7 100644
--- a/system/application/controllers/file.php
+++ b/system/application/controllers/file.php
@@ -206,7 +206,7 @@ class File extends Controller {
foreach($query->result_array() as $row) {
$file = $this->file_mod->file($row['hash']);
- if(filemtime($file) < $oldest_time) {
+ if(file_exists($file) && filemtime($file) < $oldest_time) {
unlink($file);
$this->db->query('DELETE FROM files WHERE hash = ?', array($row['hash']));
} else {