Verified Commit 081865f9 authored by Dave Long's avatar Dave Long
Browse files

fix: #3613047 RouteProvider::__construct() BC branch assigns $table to...

fix: #3613047 RouteProvider::__construct() BC branch assigns $table to $languageManager, causing fatal error on getCurrentLanguage()

By: graber
By: berdir
By: s_leu
(cherry picked from commit 6c17be9d)
parent 2d50129e
Loading
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -157,8 +157,8 @@ public function __construct(Connection $connection, StateInterface $state, Curre
      @trigger_error('Calling ' . __METHOD__ . '() without the $fast_cache argument is deprecated in drupal:11.4.0 and the argument will be required in drupal:12.0.0. See https://www.drupal.org/project/drupal/issues/3503843', E_USER_DEPRECATED);

      $this->fastCache = \Drupal::service('cache.routes');
      $this->tableName = $fast_cache;
      $this->languageManager = $table ?: \Drupal::languageManager();
      $this->tableName = is_string($fast_cache) ? $fast_cache : 'router';
      $this->languageManager = $table instanceof LanguageManagerInterface ? $table : \Drupal::languageManager();
    }
    else {
      $this->fastCache = $fast_cache;