瀏覽代碼

[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);
                 }
             }