From f8d5e386ca303c14881d32b43807dafdc685909f Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Thu, 15 Sep 2011 22:48:48 +0200 Subject: valid_id: bail early if we can't get the file data Signed-off-by: Florian Pritz --- application/models/file_mod.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'application') diff --git a/application/models/file_mod.php b/application/models/file_mod.php index fce84c090..f890744cf 100644 --- a/application/models/file_mod.php +++ b/application/models/file_mod.php @@ -150,6 +150,9 @@ class File_mod extends CI_Model { function valid_id($id) { $filedata = $this->get_filedata($id); + if (!$filedata) { + return false; + } $file = $this->file($filedata['hash']); if (!file_exists($file)) { -- cgit v1.2.3-24-g4f1b