From 75453670009e76f0a62f9ee9f3d73688347af914 Mon Sep 17 00:00:00 2001 From: nokonoko Date: Wed, 18 Nov 2020 15:05:26 +0100 Subject: [PATCH] fixed error codes --- static/php/upload.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/static/php/upload.php b/static/php/upload.php index 8719076..d1a4d4c 100644 --- a/static/php/upload.php +++ b/static/php/upload.php @@ -105,6 +105,7 @@ function uploadFile($file) // Attempt to move it to the static directory if (!move_uploaded_file($file->tempfile, $uploadFile)) { + http_response_code(500); throw new Exception( 'Failed to move file to destination', 500 @@ -113,6 +114,7 @@ function uploadFile($file) // Need to change permissions for the new file to make it world readable if (!chmod($uploadFile, 0644)) { + http_response_code(500); throw new Exception( 'Failed to change file permissions', 500