From 38726d8d54506cd2d7eaed4ff865559748d9cede Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Thu, 7 Nov 2019 14:06:15 +0100 Subject: [PATCH] [DI] Dont cache classes with missing parents --- src/Symfony/Component/DependencyInjection/ContainerBuilder.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Symfony/Component/DependencyInjection/ContainerBuilder.php b/src/Symfony/Component/DependencyInjection/ContainerBuilder.php index 53873c15e6252..f9bfcb52109d5 100644 --- a/src/Symfony/Component/DependencyInjection/ContainerBuilder.php +++ b/src/Symfony/Component/DependencyInjection/ContainerBuilder.php @@ -361,7 +361,7 @@ public function getReflectionClass($class, $throw = true) return null; } - $resource = null; + $resource = $classReflector = null; try { if (isset($this->classReflectors[$class])) { @@ -376,7 +376,6 @@ public function getReflectionClass($class, $throw = true) if ($throw) { throw $e; } - $classReflector = false; } if ($this->trackResources) {