diff --git a/src/Symfony/Component/HttpFoundation/Response.php b/src/Symfony/Component/HttpFoundation/Response.php index 1d19a2ed82..882ac4d365 100644 --- a/src/Symfony/Component/HttpFoundation/Response.php +++ b/src/Symfony/Component/HttpFoundation/Response.php @@ -206,7 +206,7 @@ class Response $headers = $this->headers; if ($this->isInformational() || in_array($this->statusCode, array(204, 304))) { - $this->setContent(''); + $this->setContent(null); } // Content-type based on the Request @@ -234,7 +234,7 @@ class Response if ('HEAD' === $request->getMethod()) { // cf. RFC2616 14.13 $length = $headers->get('Content-Length'); - $this->setContent(''); + $this->setContent(null); if ($length) { $headers->set('Content-Length', $length); } diff --git a/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php b/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php index 49642d4801..ec66dcd5fc 100644 --- a/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php +++ b/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php @@ -581,7 +581,7 @@ class HttpCache implements HttpKernelInterface, TerminableInterface private function restoreResponseBody(Request $request, Response $response) { if ('HEAD' === $request->getMethod() || 304 === $response->getStatusCode()) { - $response->setContent(''); + $response->setContent(null); $response->headers->remove('X-Body-Eval'); $response->headers->remove('X-Body-File');