From 36a82c286357685355cedb72e42dcc25a37fb21d Mon Sep 17 00:00:00 2001 From: Marcin Kurczewski Date: Sun, 13 Oct 2013 13:33:34 +0200 Subject: [PATCH] Fixed problems with uploaded files --- src/Controllers/PostController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Controllers/PostController.php b/src/Controllers/PostController.php index b3e6cb83..96fe825f 100644 --- a/src/Controllers/PostController.php +++ b/src/Controllers/PostController.php @@ -296,7 +296,7 @@ class PostController $this->context->subTitle = 'upload'; PrivilegesHelper::confirmWithException($this->context->user, Privilege::UploadPost); - if (isset($_FILES['file'])) + if (!empty($_FILES['file']['name'])) { /* safety */ $suppliedSafety = intval(InputHelper::get('safety')); @@ -454,7 +454,7 @@ class PostController /* thumbnail */ - if (isset($_FILES['thumb'])) + if (!empty($_FILES['thumb']['name'])) { PrivilegesHelper::confirmWithException($this->context->user, Privilege::EditPostThumb, $secondary); $suppliedFile = $_FILES['thumb'];