- Issue created by @Rajab Natshah
- Merge request !76Issue #3463712: Fix fatal error when pressing Run checklist button β (Open) created by Rajab Natshah
- Issue was unassigned.
- Status changed to Needs review
4 months ago 9:17am 25 July 2024 - Status changed to Postponed: needs info
4 months ago 3:05pm 25 July 2024 - πΊπΈUnited States smustgrave
Tried replicating following the steps but could now.
I applied patch "3463712-fix-fatal-error" above on Drupal 10.3.1 with drupal/security_review:^3, and it still crashes with the same error message.
- π―π΄Jordan Rajab Natshah Jordan
You are right Stephen, I'm not able to reproduce with Drupal Standard alone
Having many enabled modules. - πΊπΈUnited States dgroene
I am getting the same error - TypeError: array_key_exists(): Argument #2 ($array) must be of type array, null given in array_key_exists() (line 203 of modules/contrib/security_review/src/SecurityReview.php).
- πΊπΈUnited States dgroene
OK, so this was happening because we had no configuration in place. If there is no config, then the second parameter of array_key_exists is null, which causes the php error. There should be a null check here, or a default value of [].
Simple solution to avoid the error: Go to the config page and hit save. The error only occurs when there is not yet any configuration.
- Status changed to Needs review
4 months ago 10:56pm 30 July 2024 - πΊπΈUnited States greggles Denver, Colorado, USA
There's lots more detail now and an MR. Thanks for all that!
Adjusting status to needs review accordingly.
- πΊπΈUnited States greggles Denver, Colorado, USA
I tried to replicate the bug and am unable to trigger it following the description. It's possible I misunderstood a step in the process.
I did adjust my sites/default/settings.php to include:
<?PHP
$settings['container_yamls'][] = $app_root . '/' . $site_path . '/development.local.services.yml';
?>And then did a drush cr and then ran the check.
Is that what you intended with that services yml file?
- π―π΄Jordan Rajab Natshah Jordan
Yes, that is my intended setup, thanks, Greg for following.
Douglas got it right, in #9
It seems when we install with an old config or no config has been saved yet.I suggest a fallback fix could be easier than trying to fix this in 20K+ sites.
- π©π°Denmark ressa Copenhagen
Got here after getting the error, and can confirm that going to "Security Review Settings" (/admin/config/security-review) and saving configuration fixed it. I didn't catch there was a patch which I could have tested, sorry.
-
smustgrave β
committed 2ac9e462 on 3.0.x
Issue #3463712 by Rajab Natshah: Fix fatal error when pressing Run...
-
smustgrave β
committed 2ac9e462 on 3.0.x
- Status changed to Fixed
4 months ago 1:36pm 7 August 2024 - πΊπΈUnited States smustgrave
Still not able to replicate but seems enough people are hitting it and the code really isn't disruptive so merged.
Automatically closed - issue fixed for 2 weeks with no activity.