소스 검색

[DependencyInjection] fixed interface injection when the class is not available

Fabien Potencier 14 년 전
부모
커밋
183acd8460
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      src/Symfony/Component/DependencyInjection/InterfaceInjector.php

+ 4 - 0
src/Symfony/Component/DependencyInjection/InterfaceInjector.php

@@ -90,6 +90,10 @@ class InterfaceInjector
     public function supports($object)
     {
         if (is_string($object)) {
+            if (!class_exists($object)) {
+                return false;
+            }
+
             $reflection = new \ReflectionClass($object);
 
             return $reflection->isSubClassOf($this->class)