bug #35424 [HttpKernel] Check if lock can be released (sjadema)

This PR was merged into the 4.4 branch.

Discussion
----------

[HttpKernel] Check if lock can be released

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #35421
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

[HttpKernel] Make sure the `$cache->release()` method exists before executing it

Commits
-------

2001e54e82 [HttpKernel] Check if lock can be released
This commit is contained in:
Fabien Potencier 2020-01-22 07:59:34 +01:00
commit 79a7b8b075
1 changed files with 4 additions and 1 deletions

View File

@ -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);