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

Merge pull request #3918 from avni/uf-fix

upload/upload-file.php: fix var name bug and add better error handling
This commit is contained in:
A Holt 2025-01-26 10:56:08 -05:00 committed by GitHub
commit 8cbcff710e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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/>');
}
}