When a user was trying to register, he was getting the following error:
warning: array_keys() [function.array-keys]: The first argument should be an array in user.module on line 502. 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 p.perm FROM msn_role r INNER JOIN msn_permission p ON p.rid = r.rid WHERE r.rid IN () in user.module on line 502.
In the end, the user was registered. But it was very confusing :-).
It seems to be a bug in Drupal 6.1x. I found the solution here: http://drupal.org/node/642126.
Go to: $SITE_HOME/modules/user/user.module and change line 502:
if (!isset($perm[$account->uid])) {
... into ...
You were receiving that error because $account->roles is empty and you cannot perform a SQL query with IN ()
Add new comment