[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());
|
||||
$cache->release();
|
||||
if (method_exists($cache, 'release')) {
|
||||
$cache->release();
|
||||
}
|
||||
|
||||
$this->container = require $cachePath;
|
||||
$this->container->set('kernel', $this);
|
||||
|
||||
|
|
Reference in New Issue