Changed cron upload so that an unrecognised file type results in an error instead of a success

This commit is contained in:
Matthew Barbour 2019-06-09 14:17:13 -05:00 committed by Shish
parent 1d1536b1ee
commit 68c3e5ea42

View File

@ -339,7 +339,7 @@ class CronUploader extends Extension
// Generate info message
$infomsg = ""; // Will contain info message
if ($event->image_id == -1) {
$infomsg = "File type not recognised. Filename: {$filename}";
throw new Exception("File type not recognised. Filename: {$filename}");
} else {
$infomsg = "Image uploaded. ID: {$event->image_id} - Filename: {$filename} - Tags: {$tags}";
}