From d30ca86ef3a1fda50ab08fd4bea553e7134ab7f4 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Mon, 31 Mar 2025 11:00:48 +0200 Subject: [inc/Message] Output plain text in API mode --- inc/request.inc.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'inc/request.inc.php') diff --git a/inc/request.inc.php b/inc/request.inc.php index cd782d99..e126d551 100644 --- a/inc/request.inc.php +++ b/inc/request.inc.php @@ -73,12 +73,16 @@ class Request if (!array_key_exists($key, $array)) { if ($default === self::REQUIRED || $default === self::REQUIRED_EMPTY) { Message::addError('main.parameter-missing', $key); + if (API) + exit; Util::redirect('?do=' . $_REQUEST['do']); } return $default; } if ($default === self::REQUIRED && $array[$key] === '') { Message::addError('main.parameter-empty', $key); + if (API) + exit; Util::redirect('?do=' . $_REQUEST['do']); } if ($type !== false) settype($array[$key], $type); -- cgit v1.2.3-55-g7522