- Bugfix for json_encode() which do not result in an array
This commit is contained in:
1 parent
ff4ade51fb
commit
f7f351bc9b
1 file changed
+1
-1
@@ -58,7 +58,7 @@ namespace 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);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user