Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
During "Runtime", the hook_requirements implementation returns "Null". This throws errors. Note this comment in the hook_requirements documentation: you must always return an array:
Comment | File | Size | Author |
---|---|---|---|
#2 | invalid_requirement_return_value-2923111-2.patch | 397 bytes | gcb |
|
Comments
Comment #2
gcbPatch attached.
Comment #3
olivier.bouwman CreditAttribution: olivier.bouwman at ThinkShout commentedI successfully tested this patch (#2). On a site build, I was getting the following error and the build would fail.
Fatal error: Unsupported operand types in /code/includes/install.core.inc on line 746.
After applying the patch, no more error and a successful build. Thanks @gcb!Comment #4
hargobindThe patch in #2 works great.
Per the documentation, hook_requirements() must return an associative array. So the patch fixes this issue.
Comment #5
hargobindMarking this as major priority since it causes issues during installation, yet it's still possible to install it without errors with drush.
Comment #7
wellsCommitted in to 7.x-1.2, thanks @gcb!