Problem/Motivation
In some cases the LimitLanguageOptionsCallback.php may throw:
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 55 of modules/contrib/language_access/src/LimitLanguageOptionsCallback.php).Steps to reproduce
- hard to say, but was able to trigger the problem on my configuration
Proposed resolution
- patch
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | language_access-3391364-patch4.patch | 1.03 KB | mohd sahzad |
| #2 | 3391364-2.patch | 1.23 KB | piotr pakulski |
Issue fork language_access-3391364
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
piotr pakulskiPrepared patch for this issue
Comment #3
piotr pakulskiComment #4
piotr pakulskiComment #5
jeroentComment #6
mohd sahzad commentedComment #7
mohd sahzad commentedI have updated this issue in above attached patch4
Comment #10
jeroentMerged to 2.0.x. Thanks!
Comment #13
piotr pakulskiI can still see:
TypeError: array_keys(): Argument #1 ($array) must be of type array, null given in array_keys() (line 59 of /var/www/html/docroot/modules/contrib/language_access/src/LimitLanguageOptionsCallback.php).
on version 2.0.2
Comment #14
piotr pakulskiMR17 does not seems to cover afterBuild() method. It's still fragile.