Issue #3042694 by mikelutz, jibran: [Symfony 4] JSON:API ResourceResponseSubscriber can pass NULL to Symfony\Component\HttpFoundation\Response::setCharset()
parent
7b81fcfc91
commit
0df3be0e23
core/modules/jsonapi/src/EventSubscriber
|
@ -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());
|
||||
|
|
Loading…
Reference in New Issue