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)){