From 023788b93d8c2eb6f5128c09f74aeccb9144b74e Mon Sep 17 00:00:00 2001 From: Jonas Kohl Date: Fri, 11 Oct 2024 14:44:38 +0200 Subject: Change from exceptions to error pages --- src/application/actions/lookupuser/get.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/application/actions/lookupuser') diff --git a/src/application/actions/lookupuser/get.php b/src/application/actions/lookupuser/get.php index 74143f4..a7ed215 100644 --- a/src/application/actions/lookupuser/get.php +++ b/src/application/actions/lookupuser/get.php @@ -2,7 +2,11 @@ use mystic\forum\orm\User; -$userHandle = $_GET["handle"] ?? throw new Exception(__("Missing handle")); +$userHandle = $_GET["handle"] ?? call_user_func(function() { + http_response_code(400); + msg_error(__("Missing handle")); + exit; +}); $user = new User(); $user->name = $userHandle; -- cgit v1.2.3