Skip to content

Commit 8264a9e

Browse files
[HttpKernel] Fix loading legacy 3.3 containers in 3.4 context
1 parent 483c7ba commit 8264a9e

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/Symfony/Component/HttpKernel/Kernel.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -598,9 +598,7 @@ protected function initializeContainer()
598598
}
599599
}
600600

601-
if ($oldContainer = file_exists($cache->getPath()) ? @include $cache->getPath() : false) {
602-
$oldContainer = new \ReflectionClass($oldContainer);
603-
}
601+
$oldContainer = file_exists($cache->getPath()) && is_object($oldContainer = @include $cache->getPath()) ? new \ReflectionClass($oldContainer) : false;
604602

605603
$this->dumpContainer($cache, $container, $class, $this->getContainerBaseClass());
606604

0 commit comments

Comments
 (0)