From 35cd567c48ca2f29629ee70bf8628e85ec2bbc25 Mon Sep 17 00:00:00 2001 From: Michael Kaufmann Date: Tue, 13 Jul 2021 09:01:22 +0200 Subject: [PATCH] check whether there was an image upload at all Signed-off-by: Michael Kaufmann --- lib/Froxlor/Settings/Store.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Froxlor/Settings/Store.php b/lib/Froxlor/Settings/Store.php index 69e365fa..1f8a3a60 100644 --- a/lib/Froxlor/Settings/Store.php +++ b/lib/Froxlor/Settings/Store.php @@ -375,7 +375,7 @@ class Store $path = \Froxlor\Froxlor::getInstallDir().'/img/'; // New file? - if ($_FILES[$fieldname]['tmp_name']) { + if (isset($_FILES[$fieldname]) && $_FILES[$fieldname]['tmp_name']) { // Make sure upload directory exists if (!is_dir($path) && !mkdir($path, '0775')) { throw new \Exception("img directory does not exist and cannot be created");