Hi,

The parameters to hook_access() have changed in Drupal 6. See http://drupal.org/node/114774#hook_access for more information.

The attached patch should allow coder to check for this.

Cheers,
Stella

CommentFileSizeAuthor
#4 223892.patch3.14 KBdouggreen
coder_hook_access.patch1.75 KBstella

Comments

stella’s picture

Status: Needs review » Fixed

Committed to CVS for 5.x and 6.x versions.

Cheers,
Stella

Anonymous’s picture

Status: Fixed » Closed (fixed)

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

nancydru’s picture

Status: Closed (fixed) » Active

False positive:
Line 12: Parameters to hook_access() have changed (Drupal Docs)

function _weblinks_user_form_access($user, $account) {

douggreen’s picture

Status: Active » Needs review
StatusFileSize
new3.14 KB

This is actually a bigger issue. We have several false positives due too liberal matching of function names. This patch takes a first stab at adding support for hook_ in the regex, which is a special case that ONLY matches the current module name. As the simpletests aren't very complete yet, some testing of this patch is needed.

mgifford’s picture

Issue tags: +hook_access

Not sure what happened to this patch, but in looking for this problem in D7 I also came across this issue. Figured it would be worth while linking to the latest issue #575738: false positives for hook sniffing

klausi’s picture

Issue summary: View changes
Status: Needs review » Closed (won't fix)

Coder for Drupal 6 is now frozen and only security fixes will be applied. Feel free to update this issue and reopen against 7.x-2.x or 8.x-2.x.