소스 검색

[HttpFoundation] fixed a bug in previous merge

Fabien Potencier 14 년 전
부모
커밋
84e87c65cc
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/Symfony/Component/HttpFoundation/Response.php

+ 1 - 1
src/Symfony/Component/HttpFoundation/Response.php

@@ -167,7 +167,7 @@ class Response
      */
     public function setContent($content)
     {
-        if (!is_string($content) && !is_numeric($content) && !is_callable(array($content, '__toString'))) {
+        if (null !== $content && !is_string($content) && !is_numeric($content) && !is_callable(array($content, '__toString'))) {
             throw new \UnexpectedValueException('The Response content must be a string or object implementing __toString(), "'.gettype($content).'" given.');
         }