Przeglądaj źródła

merged branch jfsimon/issue-3896 (PR #4001)

Commits
-------

cd783fb [HttpKernel] Fixed cache vary lookup (fixes #3896).

Discussion
----------

[HttpKernel] Fixed cache vary lookup (fixes #3896).

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #3896
Fabien Potencier 13 lat temu
rodzic
commit
d599442cc1

+ 1 - 1
src/Symfony/Component/HttpKernel/HttpCache/Store.php

@@ -110,7 +110,7 @@ class Store implements StoreInterface
         // find a cached entry that matches the request.
         $match = null;
         foreach ($entries as $entry) {
-            if ($this->requestsMatch(isset($entry[1]['vary']) ? $entry[1]['vary'][0] : '', $request->headers->all(), $entry[0])) {
+            if ($this->requestsMatch(isset($entry[1]['vary'][0]) ? $entry[1]['vary'][0] : '', $request->headers->all(), $entry[0])) {
                 $match = $entry;
 
                 break;