]> git.mxchange.org Git - friendica.git/commitdiff
temporary merge response header into static *exit() methods because of compatibility...
authorPhilipp <admin@philipp.info>
Sun, 2 Jan 2022 22:21:52 +0000 (23:21 +0100)
committerPhilipp <admin@philipp.info>
Tue, 4 Jan 2022 19:59:27 +0000 (20:59 +0100)
src/Core/System.php

index 562502895b6dbe61aac508e7e197a34473d755ff..fa387031396f881d4b0004f34d5ecd92940c3a80 100644 (file)
@@ -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();