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...

CommentFileSizeAuthor
#2 coder_review_704032.patch848 bytesfgm

Comments

fgm’s picture

Version: 7.x-1.0-beta2 » 7.x-1.0-beta4

Same 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:

    if ($depth = 0) {

instead of

    if ($depth == 0) {

Doing this change removes the issue.

fgm’s picture

Status: Active » Needs review
StatusFileSize
new848 bytes

Patch attached with suggested change.

axyjo’s picture

Status: Needs review » Reviewed & tested by the community

Confirming bug and that the solution works as well. RTBC.

axyjo’s picture

Version: 7.x-1.0-beta4 » 7.x-1.x-dev

Version change.

stella’s picture

Status: Reviewed & tested by the community » Fixed

Committed, thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.