소스 검색

[Form] fixed AbstractExtension when an extension does not have a guesser

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

+ 1 - 1
src/Symfony/Component/Form/AbstractExtension.php

@@ -212,7 +212,7 @@ abstract class AbstractExtension implements FormExtensionInterface
         $this->typeGuesserLoaded = true;
 
         $this->typeGuesser = $this->loadTypeGuesser();
-        if (!$this->typeGuesser instanceof FormTypeGuesserInterface) {
+        if (null !== $this->typeGuesser && !$this->typeGuesser instanceof FormTypeGuesserInterface) {
             throw new UnexpectedTypeException($this->typeGuesser, 'Symfony\Component\Form\FormTypeGuesserInterface');
         }
     }