From 68c3e5ea42a18891ddfddb5df20eb7bc15266bf9 Mon Sep 17 00:00:00 2001 From: Matthew Barbour Date: Sun, 9 Jun 2019 14:17:13 -0500 Subject: [PATCH] Changed cron upload so that an unrecognised file type results in an error instead of a success --- ext/cron_uploader/main.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/cron_uploader/main.php b/ext/cron_uploader/main.php index 6168e776..dbcf549c 100644 --- a/ext/cron_uploader/main.php +++ b/ext/cron_uploader/main.php @@ -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}"; }