TypeError: array_keys(): Argument #1 ($array) must be of type array, null given in array_keys()

Created on 13 April 2023, almost 2 years ago

Problem/Motivation

The website encountered an unexpected error. Please try again later.
TypeError: array_keys(): Argument #1 ($array) must be of type array, null given in array_keys() (line 726 of modules/contrib/lang_dropdown/src/Plugin/Block/LanguageDropdownBlock.php).

Steps to reproduce

  • Enable module
  • Place language switcher block and set visibility to show on all pages(default)
  • Visit /user/login page
  • You will see the above mentioned error.

Proposed resolution

For now, return blank array if language don't have links though site have languages but still it giving null, rather that looping it through.

πŸ› Bug report
Status

Closed: duplicate

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States imran1217

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

Comments & Activities

Production build 0.71.5 2024