diff options
Diffstat (limited to 'src/application/actions/attachment/get.php')
| -rw-r--r-- | src/application/actions/attachment/get.php | 6 | 
1 files changed, 5 insertions, 1 deletions
| diff --git a/src/application/actions/attachment/get.php b/src/application/actions/attachment/get.php index 39f14a3..8c6996f 100644 --- a/src/application/actions/attachment/get.php +++ b/src/application/actions/attachment/get.php @@ -9,7 +9,11 @@ if (!$currentUser) {      exit;  } -$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)) { |