summaryrefslogtreecommitdiffstats
path: root/application/models
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2016-05-24 14:54:59 +0200
committerFlorian Pritz <bluewind@xinu.at>2016-05-24 14:54:59 +0200
commit843f8313c321d7aac25f89ffa0a481470e614c0b (patch)
treeabf0e99f280f7e5d67d0bdc5517407924d2e31d8 /application/models
parent6459753e3c4898354f0731378eac73428b710f7b (diff)
Fix TypeError when getting thumbnail for invalid ID
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application/models')
-rw-r--r--application/models/mfile.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/application/models/mfile.php b/application/models/mfile.php
index ea81ee32d..feccfcb8f 100644
--- a/application/models/mfile.php
+++ b/application/models/mfile.php
@@ -131,6 +131,11 @@ class Mfile extends CI_Model {
public function valid_id($id)
{
$filedata = $this->get_filedata($id);
+
+ if (!$filedata) {
+ return false;
+ }
+
return \service\files::valid_id($filedata, $this->id_validation_config, $this, time());
}