From 71272e07ee6f583c16ddc30db89dd176f0031aad Mon Sep 17 00:00:00 2001 From: Philipp Date: Sun, 2 Jan 2022 23:21:52 +0100 Subject: [PATCH] temporary merge response header into static *exit() methods because of compatibility issues --- src/Core/System.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Core/System.php b/src/Core/System.php index 562502895b..fa38703139 100644 --- a/src/Core/System.php +++ b/src/Core/System.php @@ -315,7 +315,7 @@ class System Logger::debug('Exit with error', ['code' => $val, 'message' => $message, 'callstack' => System::callstack(20), 'method' => $_SERVER['REQUEST_METHOD'], 'agent' => $_SERVER['HTTP_USER_AGENT'] ?? '']); } header($_SERVER["SERVER_PROTOCOL"] . ' ' . $val . ' ' . $message); - + DI::page()->exit(DI::apiResponse()->generate()); echo $content; exit(); @@ -342,6 +342,7 @@ class System * @param integer $options JSON options */ public static function jsonExit($x, $content_type = 'application/json', int $options = 0) { + DI::page()->exit(DI::apiResponse()->generate()); header("Content-type: $content_type"); echo json_encode($x, $options); exit();