1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-12 11:12:06 +00:00

upload/upload-file.php: fix var name bug and add better error handling

This commit is contained in:
avni 2025-01-26 16:36:43 +01:00
parent b0ef084ac8
commit 1795276b20

View file

@ -41,7 +41,8 @@ if ($upload_ok == 0) {
if (move_uploaded_file($_FILES["uploaded_file"]["tmp_name"], $target_file)) {
$upload_msg = "&#x1F60A; &#x2705; Your file <span style=\"font-weight:bold; font-style:italic;\">". htmlspecialchars( $uploaded_filename ). "</span> was successfully uploaded!";
} else {
$upload_msg = "&#x274C; There was an error uploading your file. " . $_FILES["upload_file"]["error"] . $upload_msg;
$upload_ok = 0;
throw new RuntimeException('There was an error uploading your file. <br/><br/>');
}
}