Commit 9812a826 authored by Robert Ricci's avatar Robert Ricci

Give a more meaningful error message if the user tries to upload a

file that does not exist.
parent 832661c4
......@@ -171,6 +171,9 @@ if (isset($exp_localnsfile) && strcmp($exp_localnsfile, "")) {
if (isset($_FILES['exp_nsfile']) &&
$_FILES['exp_nsfile']['name'] != "" &&
$_FILES['exp_nsfile']['tmp_name'] != "") {
if ($_FILES['exp_nsfile']['size'] == 0) {
USERERROR("Uploaded NS file does not exist, or is empty");
}
$specupload = 1;
}
if (!$speclocal && !$specupload && isset($nsdata)) {
......
......@@ -51,6 +51,9 @@ if (isset($exp_localnsfile) && strcmp($exp_localnsfile, "")) {
if (isset($_FILES['exp_nsfile']) &&
$_FILES['exp_nsfile']['name'] != "" &&
$_FILES['exp_nsfile']['tmp_name'] != "") {
if ($_FILES['exp_nsfile']['size'] == 0) {
USERERROR("Uploaded NS file does not exist, or is empty");
}
$specupload = 1;
}
if (!$speclocal && !$specupload && isset($nsdata)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment