From 39eacae51f4fbc239a11b150b752a76bccf74445 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Thu, 29 Aug 2013 17:57:09 +0200 Subject: claim_id: Fix error when called directly without last_upload data Signed-off-by: Florian Pritz --- application/controllers/file.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'application/controllers/file.php') diff --git a/application/controllers/file.php b/application/controllers/file.php index 992252ff5..6e660b306 100644 --- a/application/controllers/file.php +++ b/application/controllers/file.php @@ -704,9 +704,16 @@ class File extends MY_Controller { $this->muser->require_access(); $last_upload = $this->session->userdata("last_upload"); + + if ($last_upload === false) { + show_error("Failed to get last upload data"); + } + $ids = $last_upload["ids"]; $errors = array(); + assert(is_array($ids)); + foreach ($ids as $key => $id) { $filedata = $this->mfile->get_filedata($id); -- cgit v1.2.3-24-g4f1b