- Bugfix for json_encode() which do not result in an array

This commit is contained in:
Dev 2026-06-09 19:23:23 +00:00
parent ff4ade51fb
commit ef5da7bb7e

View File

@ -58,7 +58,7 @@ namespace Dump {
} }
if (isset($dump)) { if (isset($dump)) {
$json = json_encode(array_merge(["_dump" => $dump ], json_decode($body->getContents() ?? "{}", true)), JsonResponse::DEFAULT_JSON_FLAGS); $json = json_encode(array_merge(["_dump" => $dump ], (array) json_decode($body->getContents() ?? "{}", true)), JsonResponse::DEFAULT_JSON_FLAGS);
$stream->write(! is_string($json) ? json_encode($json, JsonResponse::DEFAULT_JSON_FLAGS) : $json); $stream->write(! is_string($json) ? json_encode($json, JsonResponse::DEFAULT_JSON_FLAGS) : $json);
} }