I'm getting the following review error in 7.x-1.0-beta2:
Line 232: Use module_implements not module_list when calling hook implementations. (Drupal Docs)
$info = module_invoke($module, '',
However, when I look at line 231-3, this is what I have in my file:
foreach (module_implements('sbp_excerpt_match') as $module) {
$info = module_invoke($module, 'sbp_excerpt_match',
$key, $text, $included[$key], $boundary);
So. I am actually using module_implements. I don't have module_list() anywhere in my file.
The warning is incorrect, and what I am doing follows established patterns in the core code...
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | coder_review_704032.patch | 848 bytes | fgm |
Comments
Comment #1
fgmSame problem here, and on 7.x-1.0-beta4 : no module_list() at all in the file, and this warning triggers nonetheless.
This is especially annoying as coder_review marks this as a critical.
It might be due to line 910 in
_coder_review_7x_module_implements_review_callback()doing:instead of
Doing this change removes the issue.
Comment #2
fgmPatch attached with suggested change.
Comment #3
axyjo commentedConfirming bug and that the solution works as well. RTBC.
Comment #4
axyjo commentedVersion change.
Comment #5
stella commentedCommitted, thanks!