mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-25 11:38:44 +02:00
N°8910 - Upgrade Symfony packages (#811)
This commit is contained in:
@@ -211,13 +211,9 @@ class Store implements StoreInterface
|
||||
|
||||
// read existing cache entries, remove non-varying, and add this one to the list
|
||||
$entries = [];
|
||||
$vary = $response->headers->get('vary');
|
||||
$vary = implode(', ', $response->headers->all('vary'));
|
||||
foreach ($this->getMetadata($key) as $entry) {
|
||||
if (!isset($entry[1]['vary'][0])) {
|
||||
$entry[1]['vary'] = [''];
|
||||
}
|
||||
|
||||
if ($entry[1]['vary'][0] != $vary || !$this->requestsMatch($vary ?? '', $entry[0], $storedEnv)) {
|
||||
if (!$this->requestsMatch($vary ?? '', $entry[0], $storedEnv)) {
|
||||
$entries[] = $entry;
|
||||
}
|
||||
}
|
||||
@@ -285,7 +281,7 @@ class Store implements StoreInterface
|
||||
*/
|
||||
private function requestsMatch(?string $vary, array $env1, array $env2): bool
|
||||
{
|
||||
if (empty($vary)) {
|
||||
if ('' === ($vary ?? '')) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user