From 93817fef3ead7cfd4fcde25ea2bcec02d01310a4 Mon Sep 17 00:00:00 2001 From: Jonas Kohl Date: Fri, 13 Sep 2024 19:57:43 +0200 Subject: A lot of changes again --- src/application/mystic/forum/utils/RequestUtils.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/application/mystic/forum/utils/RequestUtils.php') diff --git a/src/application/mystic/forum/utils/RequestUtils.php b/src/application/mystic/forum/utils/RequestUtils.php index f6ce3a3..6599052 100644 --- a/src/application/mystic/forum/utils/RequestUtils.php +++ b/src/application/mystic/forum/utils/RequestUtils.php @@ -30,9 +30,10 @@ final class RequestUtils { public static function getRequiredField(string $field): string { $fieldValue = $_POST[$field] ?? null; if ($fieldValue === null) { - http_response_code(400); - Messaging::error("Missing required field $field"); - exit; + //http_response_code(400); + //Messaging::error("Missing required field $field"); + RequestUtils::triggerFormError("Missing required field '$field'"); + //exit; } return $fieldValue; } -- cgit v1.2.3