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

This commit is contained in:
Dev committed 2026-06-09 19:23:23 +00:00
1 parent ff4ade51fb
commit f7f351bc9b
1 file changed
+1 -1
+1 -1
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);
} }