From 8264a9e3983c922126ccfa29c091a8d35f197dda Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Wed, 30 Aug 2017 16:21:48 +0200 Subject: [PATCH] [HttpKernel] Fix loading legacy 3.3 containers in 3.4 context --- src/Symfony/Component/HttpKernel/Kernel.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index df795fcd33dbd..d20258d4ac389 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -598,9 +598,7 @@ protected function initializeContainer() } } - if ($oldContainer = file_exists($cache->getPath()) ? @include $cache->getPath() : false) { - $oldContainer = new \ReflectionClass($oldContainer); - } + $oldContainer = file_exists($cache->getPath()) && is_object($oldContainer = @include $cache->getPath()) ? new \ReflectionClass($oldContainer) : false; $this->dumpContainer($cache, $container, $class, $this->getContainerBaseClass());