check whether there was an image upload at all
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -375,7 +375,7 @@ class Store
|
|||||||
$path = \Froxlor\Froxlor::getInstallDir().'/img/';
|
$path = \Froxlor\Froxlor::getInstallDir().'/img/';
|
||||||
|
|
||||||
// New file?
|
// New file?
|
||||||
if ($_FILES[$fieldname]['tmp_name']) {
|
if (isset($_FILES[$fieldname]) && $_FILES[$fieldname]['tmp_name']) {
|
||||||
// Make sure upload directory exists
|
// Make sure upload directory exists
|
||||||
if (!is_dir($path) && !mkdir($path, '0775')) {
|
if (!is_dir($path) && !mkdir($path, '0775')) {
|
||||||
throw new \Exception("img directory does not exist and cannot be created");
|
throw new \Exception("img directory does not exist and cannot be created");
|
||||||
|
|||||||
Reference in New Issue
Block a user