소스 검색

[DependencyInjection] fixed ResolveInterfaceInjectorsPass, as services might not have a class defined due to a scope (e.g. 'request')

Bulat Shakirzyanov 14 년 전
부모
커밋
04e16e433d
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/Symfony/Component/DependencyInjection/Compiler/ResolveInterfaceInjectorsPass.php

+ 1 - 1
src/Symfony/Component/DependencyInjection/Compiler/ResolveInterfaceInjectorsPass.php

@@ -38,7 +38,7 @@ class ResolveInterfaceInjectorsPass implements CompilerPassInterface
                     require_once $definition->getFile();
                 }
 
-                if ($injector->supports($definition->getClass())) {
+                if (null !== $definition->getClass() && $injector->supports($definition->getClass())) {
                     $injector->processDefinition($definition);
                 }
             }