A site this morning reported their home page was a white screen. A cache clear fixed it, but New Relic logged this error:
TypeError: Uncaught exception 'TypeError' with message 'Argument 1 passed to escort_library_info_alter() must be of the type array, null given, called in /srv/bindings/[redacted]/code/core/lib/Drupal/Core/Extension/ModuleHandler.php on line 501' in /srv/bindings/[redacted]/code/modules/community/escort/escort.module:219
Looking at the documentation and examples for hook_libraries_info_alter(), it seems that core doesn't enforce that the $libraries argument must be an array. Maybe because it could sometimes be null or something? So maybe the array enforcement should be removed?
Obviously, it's not documented anywhere I can find and it doesn't seem to happen often so I wouldn't think it really matters, but in this case, it seems it would've stopped the site from erroring out.
A site this morning reported their home page was a white screen. A cache clear fixed it, but New Relic logged this error:
Looking at the documentation and examples for
hook_libraries_info_alter()
, it seems that core doesn't enforce that the$libraries
argument must be anarray
. Maybe because it could sometimes be null or something? So maybe thearray
enforcement should be removed?Obviously, it's not documented anywhere I can find and it doesn't seem to happen often so I wouldn't think it really matters, but in this case, it seems it would've stopped the site from erroring out.