diff --git a/src/DumpMiddleware.php b/src/DumpMiddleware.php index 6a80ae7..5362df6 100644 --- a/src/DumpMiddleware.php +++ b/src/DumpMiddleware.php @@ -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); }