summaryrefslogtreecommitdiffstats
path: root/application/models/file_mod.php
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2011-09-15 22:48:48 +0200
committerFlorian Pritz <bluewind@xinu.at>2011-09-15 22:52:52 +0200
commitf8d5e386ca303c14881d32b43807dafdc685909f (patch)
treef8d065509edcd4d45f522ffd57e16ea5d36ebb77 /application/models/file_mod.php
parente8bc4a04cfe0333c4275f03073e7876190787304 (diff)
valid_id: bail early if we can't get the file data
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application/models/file_mod.php')
-rw-r--r--application/models/file_mod.php3
1 files changed, 3 insertions, 0 deletions
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)) {