Unified output via the "httpExit" function

This commit is contained in:
Michael 2022-04-10 08:31:55 +00:00
parent d15023fe4b
commit 4a22034be6
16 changed files with 69 additions and 70 deletions

View file

@ -291,9 +291,7 @@ class Ping extends BaseModule
if (isset($_GET['callback'])) {
// JSONP support
header("Content-type: application/javascript");
echo $_GET['callback'] . '(' . json_encode(['result' => $data]) . ')';
exit;
System::httpExit($_GET['callback'] . '(' . json_encode(['result' => $data]) . ')', Response::TYPE_BLANK, 'application/javascript');
} else {
System::jsonExit(['result' => $data]);
}