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

Skip to content

Commit f8cde70

Browse files
[HttpKernel] do file_exists() check instead of silent notice
1 parent 98934e4 commit f8cde70

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Component/HttpKernel/Kernel.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ protected function initializeContainer()
587587
$errorLevel = error_reporting(\E_ALL ^ \E_WARNING);
588588
$fresh = $oldContainer = false;
589589
try {
590-
if (\is_object($this->container = include $cache->getPath())) {
590+
if (file_exists($cache->getPath()) && \is_object($this->container = include $cache->getPath())) {
591591
$this->container->set('kernel', $this);
592592
$oldContainer = $this->container;
593593
$fresh = true;
@@ -650,7 +650,7 @@ protected function initializeContainer()
650650
}
651651
}
652652

653-
if (null === $oldContainer) {
653+
if (null === $oldContainer && file_exists($cache->getPath())) {
654654
$errorLevel = error_reporting(\E_ALL ^ \E_WARNING);
655655
try {
656656
$oldContainer = include $cache->getPath();

0 commit comments

Comments
 (0)