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
parent eb4292316d
commit 4410baeb9c

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}";
}