[HttpKernel] Check if lock can be released
Make sure the `$cache->release()` method exists before executing it.
This commit is contained in:
parent
a4ed963409
commit
2001e54e82
@ -634,7 +634,10 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl
|
|||||||
}
|
}
|
||||||
|
|
||||||
$this->dumpContainer($cache, $container, $class, $this->getContainerBaseClass());
|
$this->dumpContainer($cache, $container, $class, $this->getContainerBaseClass());
|
||||||
|
if (method_exists($cache, 'release')) {
|
||||||
$cache->release();
|
$cache->release();
|
||||||
|
}
|
||||||
|
|
||||||
$this->container = require $cachePath;
|
$this->container = require $cachePath;
|
||||||
$this->container->set('kernel', $this);
|
$this->container->set('kernel', $this);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user