Unverified Commit f3b06df7 authored by catch's avatar catch Committed by Alex Pott
Browse files

fix: #3557525 Fix PHP 8.5 deprecations triggered in...

fix: #3557525 Fix PHP 8.5 deprecations triggered in Drupal\language\Plugin\LanguageNegotiation\LanguageNegotiationSession->processOutbound()() (Line: 127)

By: @alexpott
By: @smustgrave
(cherry picked from commit 15639f3e)
parent 74bdbe01
Loading
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -119,15 +119,15 @@ public function processOutbound($path, &$options = [], ?Request $request = NULL,
      // The following values are not supposed to change during a single page
      // request processing.
      if (!isset($this->queryRewrite)) {
        $this->queryRewrite = FALSE;
        if ($this->currentUser->isAnonymous()) {
          $languages = $this->languageManager->getLanguages();
          $config = $this->config->get('language.negotiation')->get('session');
          $this->queryParam = $config['parameter'];
          $this->queryValue = $request->query->has($this->queryParam) ? $request->query->get($this->queryParam) : NULL;
          if ($request->query->has($this->queryParam)) {
            $languages = $this->languageManager->getLanguages();
            $this->queryValue = $request->query->get($this->queryParam);
            $this->queryRewrite = isset($languages[$this->queryValue]);
          }
        else {
          $this->queryRewrite = FALSE;
        }
      }