diff options
Diffstat (limited to 'src/application/actions/viewtopic/_common.php')
-rw-r--r-- | src/application/actions/viewtopic/_common.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/application/actions/viewtopic/_common.php b/src/application/actions/viewtopic/_common.php index b257237..080cd97 100644 --- a/src/application/actions/viewtopic/_common.php +++ b/src/application/actions/viewtopic/_common.php @@ -3,7 +3,11 @@ use mystic\forum\orm\Topic; $formId = "addpost"; -$topicId = $_GET["topic"] ?? throw new Exception(__("Missing topic id")); +$topicId = $_GET["topic"] ?? call_user_func(function() { + http_response_code(400); + msg_error(__("Missing topic id")); + exit; +}); $topic = new Topic(); $topic->id = $topicId; if (!$db->fetch($topic)) { |