akismet.module has lines
'access callback' => array('_akismet_is_moderator')
which render warnings:
warning: mysqli_real_escape_string() expects parameter 2 to be string, array given in /includes/database.mysqli.inc on line 323
according to drupal 6.x docs 'access callback' needs to be a string
'access callback' => '_akismet_is_moderator'

the same stands for line 211:
'access callback' => array('_akismet_is_node_moderator')
and also line 279:
'access callback' => array('akismet_access_callback')

CommentFileSizeAuthor
#8 akismet-242336-8.patch1.14 KBdrolp
#2 akismet_242336.patch1.15 KBdrewish

Comments

drewish’s picture

http://drupal.org/node/238720 looks like a duplicate

drewish’s picture

Status: Active » Needs review
StatusFileSize
new1.15 KB

try this out.

Freso’s picture

Status: Needs review » Reviewed & tested by the community

This is a no-brainer, really (and sorry for that :/). It should of course be a string and not an array (handbook page on access control in the menu system). Taking the liberty of marking RTBC based on the review. (I'm having some trouble of a different nature which prevents me from properly testing.)

drewish’s picture

Status: Reviewed & tested by the community » Fixed

thanks, committed to HEAD.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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

iNik’s picture

Status: Closed (fixed) » Needs work

I just checked out Akismet from HEAD and I'm still getting the error. Running a fresh Drupal 6.2 installation.

I did a find and replace and converted every instance of:

'access callback' => array('_akismet_is_moderator')

to:

'access callback' => '_akismet_is_moderator'

And that fixed the problem.

It looks like the fix was added for a couple instances of the access callback functions, but not all of them.

I'd build a patch and add this to source, but I have no idea how. :)

Freso’s picture

@iNik: The handbook has a page on how to create patches. If you're already working with CVS check-outs, you're a long way, and pretty much just have to do "cvs diff > name_of_patch.patch" (plus flags, of course, but I can't remember those, as I've just set them in my .cvsrc :p).

drolp’s picture

StatusFileSize
new1.14 KB

Here is a patch that includes the above mentioned, additional removal of array() around access callback

drewish’s picture

Status: Needs work » Fixed

thanks, committed to HEAD.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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

AndriaD’s picture

So, what do I need to do, in order to take advantage of this "fix"?

BTW, does the upgrade to 6.3 wreak any havoc with akismet? All my new 6.x themes other than those in the distrib-default were broken by that update, so I hesitate to do anything until that issue with 6.3 is resolved; so far, no one has even replied to my thread about it. *sigh*

Andria