We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 981c0d2 commit cb3be11Copy full SHA for cb3be11
src/RouterCommand.php
@@ -363,7 +363,7 @@ protected function sendResponse($response)
363
if (is_array($response) || strpos($this->request->headers->get('Accept'), 'application/json') !== false) {
364
$this->response->headers->set('Content-Type', 'application/json');
365
return $this->response
366
- ->setContent(json_encode($response))
+ ->setContent($response instanceof Response ? $response->getContent() : json_encode($response))
367
->send();
368
}
369
0 commit comments