Skip to content

Commit f9b917a

Browse files
committed
[DI] Don't instantiate unexisting reflection class
1 parent c3230f0 commit f9b917a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/DependencyInjection/Extension/Extension.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public function getConfiguration(array $config, ContainerBuilder $container)
8282
$class = $container->getReflectionClass($class);
8383
$constructor = $class ? $class->getConstructor() : null;
8484

85-
if (!$constructor || !$constructor->getNumberOfRequiredParameters()) {
85+
if ($class && (!$constructor || !$constructor->getNumberOfRequiredParameters())) {
8686
return $class->newInstance();
8787
}
8888
}

0 commit comments

Comments
 (0)