The module_invoke for hook help is generating a fatal error for modules using strict coding standards in their hook_help implementation.
The error is "Recoverable fatal error: Argument 2 passed to MODULE_help() must be an array, null given in MODULE_help()"
This is the case for the module search_api_solr for example: http://drupal.org/node/1425700
The module_invoke call in the rubik_preprocess_help_page() function should not pass NULL as an argument, as the drupal API states that the second parameter of hook_help is an array.
This is not a problem for most of the contrib modules, but if you have just one module implementing hook_help with strict coding standards, the entire help section of your site is broken.
Steps to reproduce the bug:
-install and enable module search_api_solr
-set rubik as your admin theme
-try to access any help page of any module
=> error
Comment | File | Size | Author |
---|---|---|---|
#3 | rubik-hook-help-error-1996474-3.patch | 569 bytes | jgalletta |
#1 | rubik-hook-help-error-1996474-1.patch | 438 bytes | jgalletta |
Comments
Comment #1
jgalletta CreditAttribution: jgalletta commentedHere's a patch correcting this issue.
I choose to pass array() to module_invoke instead of NULL assuming you did that because you wanted to clean something. Alternatively we can just remove the NULL parameter and pass nothing.
Comment #2
sdelbosc CreditAttribution: sdelbosc commentedShouldn't you use drupal_help_arg() rather than array() for the 2nd argument of the hook_help() implementations?
This is what seems to be used by Drupal core:
Comment #3
jgalletta CreditAttribution: jgalletta commentedIndeed.
Here's a patch using drupal_help_arg() like in core.
Comment #4
haydeniv CreditAttribution: haydeniv commentedFatal errors are bad. :(
Committed #3: 03b1a96
Thanks!