buddylist doesn't like the new drupal version.


    * warning: array_keys(): The first argument should be an array in /modules/user.module on line 339.
    * warning: implode(): Bad arguments. in /modules/user.module on line 339.
    * user warning: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1 query: SELECT DISTINCT(p.perm) FROM role r INNER JOIN permission p ON p.rid = r.rid WHERE r.rid IN () in /includes/database.mysql.inc on line 120.

Comments

robertDouglass’s picture

Priority: Critical » Normal

Please indicate what you do to get this error. Can anybody reproduce? How?

loothi’s picture

Heine’s picture

Title: warning - array_keys » Buddylist causes array_keys() error in user.module

Reassigning a title, component, category, version and title.

quicksketch’s picture

Looking into this report we can deduce the following information:

The 'new drupal version' metioned is probably DRUPAL-4-7-0-BETA-6. Which was released March 13, 2006. The line that the user refers to is the db_query called inside of the user_access function. The exact change that must've caused this issue actually occurred much earlier, back in January. The only change this line of code has undergone since then can be seen here:

http://cvs.drupal.org/viewcvs/drupal/drupal/modules/user.module?r1=1.564...

Check the comparision between lines 335 and 337.

Buddylist could only cause this problem in two scenarios:

  • an incorrect call to user_access where the second argument was not an array
  • corruption of the $user global so that $user->roles was no longer an array

Since buddylist never makes such a call or actually modifies the $user variable, we can conclude that buddylist is not the source of the problem.

kus’s picture

Status: Active » Closed (fixed)

you're totaly right. closing "the bug".