Pārlūkot izejas kodu

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

Fabien Potencier 14 gadi atpakaļ
vecāks
revīzija
183acd8460

+ 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)