summaryrefslogtreecommitdiff
path: root/src/application/actions/thumb
diff options
context:
space:
mode:
Diffstat (limited to 'src/application/actions/thumb')
-rw-r--r--src/application/actions/thumb/get.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/application/actions/thumb/get.php b/src/application/actions/thumb/get.php
index d03e5f9..33f2bc6 100644
--- a/src/application/actions/thumb/get.php
+++ b/src/application/actions/thumb/get.php
@@ -5,7 +5,11 @@ use FFMpeg\FFMpeg;
use FFMpeg\FFProbe;
use mystic\forum\orm\Attachment;
-$attId = $_GET["attachment"] ?? throw new Exception(__("Missing attachment id"));
+$attId = $_GET["attachment"] ?? call_user_func(function() {
+ http_response_code(400);
+ msg_error(__("Missing attachment id"));
+ exit;
+});
$attachment = new Attachment();
$attachment->id = $attId;
if (!$db->fetch($attachment)) {