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
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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());