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

This commit is contained in:
Bulat Shakirzyanov 2011-01-24 11:50:02 -05:00 committed by Fabien Potencier
parent e55f150fb7
commit 04e16e433d

View File

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