From 793e6bcd0825f98571c3767c8e702da5d34a11a4 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Fri, 5 Mar 2010 14:29:29 +0100 Subject: file/cron: fix error if file doesn't exists Signed-off-by: Florian Pritz --- system/application/controllers/file.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system/application/controllers') 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 { -- cgit v1.2.3-24-g4f1b