Site crashes when 'Language dropdown switcher' block is displayed

Created on 23 March 2023, almost 2 years ago

Method \Drupal\lang_dropdown\Plugin\Block\LanguageDropdownBlock::build calls method \Drupal\language\ConfigurableLanguageManager::getLanguageSwitchLinks, which can return an object or NULL.

In cases where a non-object is returned, an error of the form:

TypeError: array_keys(): Argument #1 ($array) must be of type array, null given in array_keys() (line 726 of /app/web/modules/contrib/lang_dropdown/src/Plugin/Block/LanguageDropdownBlock.php)
🐛 Bug report
Status

Closed: duplicate

Version

2.0

Component

Code

Created by

🇷🇺Russia Konstantin Che

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024