[HttpFoundation] Make use of isEmpty() method

This commit is contained in:
Alexander Schwenn 2015-01-11 14:22:08 +01:00 committed by Fabien Potencier
parent 76de7006d5
commit fc51d544b5
1 changed files with 1 additions and 1 deletions

View File

@ -207,7 +207,7 @@ class Response
{
$headers = $this->headers;
if ($this->isInformational() || in_array($this->statusCode, array(204, 304))) {
if ($this->isInformational() || $this->isEmpty()) {
$this->setContent(null);
$headers->remove('Content-Type');
$headers->remove('Content-Length');