Skip to content

Commit 835cfc2

Browse files
committed
[HttpKernel] do is_file check before include
Trying to include a file that doesn't exist issues a warning. Doing an is_file check beforehand should prevent those warnings.
1 parent 03a971b commit 835cfc2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Kernel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ protected function initializeContainer()
533533
if (!flock($lock, $wouldBlock ? \LOCK_SH : \LOCK_EX)) {
534534
fclose($lock);
535535
$lock = null;
536-
} elseif (!\is_object($this->container = include $cachePath)) {
536+
} elseif (!is_file($cachePath) || !\is_object($this->container = include $cachePath)) {
537537
$this->container = null;
538538
} elseif (!$oldContainer || \get_class($this->container) !== $oldContainer->name) {
539539
flock($lock, \LOCK_UN);

0 commit comments

Comments
 (0)