From 843f8313c321d7aac25f89ffa0a481470e614c0b Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Tue, 24 May 2016 14:54:59 +0200 Subject: Fix TypeError when getting thumbnail for invalid ID Signed-off-by: Florian Pritz --- application/models/mfile.php | 5 +++++ 1 file changed, 5 insertions(+) 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()); } -- cgit v1.2.3-24-g4f1b