|
|
|
@ -65,7 +65,6 @@ class JsonResponse implements JsonSerializable |
|
|
|
|
'Access-Control-Allow-Methods' => 'POST, GET, OPTIONS, DELETE, PUT, PATCH', |
|
|
|
|
'Access-Control-Max-Age' => '86400' |
|
|
|
|
], $headers); |
|
|
|
|
$this->preparedOutput = ''; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
@ -161,6 +160,9 @@ class JsonResponse implements JsonSerializable |
|
|
|
|
protected function preparedOutput(): JsonResponse |
|
|
|
|
{ |
|
|
|
|
try { |
|
|
|
|
if (!empty($GLOBALS['errorMessages'])){ |
|
|
|
|
$this->mergeInContent(['errorMessages'=>$GLOBALS['errorMessages']]); |
|
|
|
|
} |
|
|
|
|
json_encode($this->content); |
|
|
|
|
} catch (Throwable $th) { |
|
|
|
|
$this->code = 500; |
|
|
|
|