Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b3d31e9

Browse files
committed
bug #24040 [HttpKernel] Fix loading legacy 3.3 containers in 3.4 context (nicolas-grekas)
This PR was merged into the 3.4 branch. Discussion ---------- [HttpKernel] Fix loading legacy 3.3 containers in 3.4 context | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - When moving from 3.3 to 3.4, if a dumped container exists, an exception is triggered because "include" returns "1". ping @umpirsky Commits ------- 8264a9e [HttpKernel] Fix loading legacy 3.3 containers in 3.4 context
2 parents 483c7ba + 8264a9e commit b3d31e9

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)