[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.
This commit is contained in:
parent
5dd56a61a3
commit
8efcc17573
@ -533,7 +533,7 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl
|
|||||||
if (!flock($lock, $wouldBlock ? \LOCK_SH : \LOCK_EX)) {
|
if (!flock($lock, $wouldBlock ? \LOCK_SH : \LOCK_EX)) {
|
||||||
fclose($lock);
|
fclose($lock);
|
||||||
$lock = null;
|
$lock = null;
|
||||||
} elseif (!\is_object($this->container = include $cachePath)) {
|
} elseif (!is_file($cachePath) || !\is_object($this->container = include $cachePath)) {
|
||||||
$this->container = null;
|
$this->container = null;
|
||||||
} elseif (!$oldContainer || \get_class($this->container) !== $oldContainer->name) {
|
} elseif (!$oldContainer || \get_class($this->container) !== $oldContainer->name) {
|
||||||
flock($lock, \LOCK_UN);
|
flock($lock, \LOCK_UN);
|
||||||
|
Reference in New Issue
Block a user