Unverified Commit c9bcb2c8 authored by larowlan's avatar larowlan
Browse files

Issue #3240905 by alexpott:...

Issue #3240905 by alexpott: \Drupal\language\Plugin\LanguageNegotiation\LanguageNegotiationSession can cause deprecations in PHP 8.1
parent fa1e2888
...@@ -128,8 +128,7 @@ public function getLanguageSwitchLinks(Request $request, $type, Url $url) { ...@@ -128,8 +128,7 @@ public function getLanguageSwitchLinks(Request $request, $type, Url $url) {
$config = $this->config->get('language.negotiation')->get('session'); $config = $this->config->get('language.negotiation')->get('session');
$param = $config['parameter']; $param = $config['parameter'];
$language_query = isset($_SESSION[$param]) ? $_SESSION[$param] : $this->languageManager->getCurrentLanguage($type)->getId(); $language_query = isset($_SESSION[$param]) ? $_SESSION[$param] : $this->languageManager->getCurrentLanguage($type)->getId();
$query = []; $query = $request->query->all();
parse_str($request->getQueryString(), $query);
foreach ($this->languageManager->getNativeLanguages() as $language) { foreach ($this->languageManager->getNativeLanguages() as $language) {
$langcode = $language->getId(); $langcode = $language->getId();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment