Skip to content
Snippets Groups Projects
Commit d2bb36d8 authored by Wim Leers's avatar Wim Leers
Browse files

Issue #3042694 by mikelutz, jibran, alexpott: [Symfony 4] JSON:API...

Issue #3042694 by mikelutz, jibran, alexpott: [Symfony 4] JSON:API ResourceResponseSubscriber can pass NULL to Symfony\Component\HttpFoundation\Response::setCharset()
parent fb7bf82c
No related branches found
No related tags found
No related merge requests found
......@@ -173,7 +173,9 @@ class ResourceResponseSubscriber implements EventSubscriberInterface {
$final_response->setContent($response->getContent());
$final_response->setStatusCode($response->getStatusCode());
$final_response->setProtocolVersion($response->getProtocolVersion());
$final_response->setCharset($response->getCharset());
if ($charset = $response->getCharset()) {
$final_response->setCharset($charset);
}
$final_response->headers = clone $response->headers;
if ($final_response instanceof CacheableResponseInterface) {
$final_response->addCacheableDependency($response->getCacheableMetadata());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment