The following error occurred in the graphql module.
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 40 of /bitnami/drupal/modules/contrib/graphql/graphql.install).
I fixed the source code referring to the following article.
TypeError: array_keys(): Argument #1 ($array) must be of type array, null given in array_keys() (line 156 of modules/contrib/google_tag/src/Form/SettingsForm.php).
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 156 of modules/contrib/google_tag/src/Form/SettingsForm.php).
Specifically, by rewriting as follows, the error was resolved.
// $negotiation = $languageTypes->get('negotiation');
$negotiation = $languageTypes->get('negotiation') ?? [];
This should be fixed in the latest version, but we hope this is helpful for anyone encountering a similar error.




Comments
…