From c2aed76eda5ecefe44f8ef2ec7a575c193542431 Mon Sep 17 00:00:00 2001 From: Jan Felix Wiebe Date: Sat, 23 Feb 2019 13:55:24 +0100 Subject: [PATCH] fixed upload without image --- ajax.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ajax.php b/ajax.php index 31d7484..d3be0ef 100644 --- a/ajax.php +++ b/ajax.php @@ -182,7 +182,7 @@ switch($_GET["action"]) { } $item_id = $mysqli->insert_id; - if(isset($_FILES["image"])){ + if(isset($_FILES["image"]) && hasval($_FILES["image"]["tmp_name"])){ $hash = md5($_FILES['image']['name'].time()); if(move_uploaded_file($_FILES['image']['tmp_name'], "upload/".$hash)){