diff core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationBrowser.php @ 18:af1871eacc83

Update to Drupal core 8.7.1
author Chris Cannam
date Thu, 09 May 2019 15:33:08 +0100
parents 4c8ae668cc8c
children
line wrap: on
line diff
--- a/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationBrowser.php	Thu Feb 28 13:21:36 2019 +0000
+++ b/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationBrowser.php	Thu May 09 15:33:08 2019 +0100
@@ -35,13 +35,14 @@
       $langcodes = array_keys($this->languageManager->getLanguages());
       $mappings = $this->config->get('language.mappings')->get('map');
       $langcode = UserAgent::getBestMatchingLangcode($http_accept_language, $langcodes, $mappings);
-      // Internal page cache with multiple languages and browser negotiation
-      // could lead to wrong cached sites. Therefore disabling the internal
-      // page cache.
-      // @todo Solve more elegantly in https://www.drupal.org/node/2430335.
-      \Drupal::service('page_cache_kill_switch')->trigger();
     }
 
+    // Internal page cache with multiple languages and browser negotiation
+    // could lead to wrong cached sites. Therefore disabling the internal page
+    // cache.
+    // @todo Solve more elegantly in https://www.drupal.org/node/2430335.
+    \Drupal::service('page_cache_kill_switch')->trigger();
+
     return $langcode;
   }