This has started happening since the last Drupal core update. Note the empty IN().

warning: array_fill(): Number of elements must be positive in /var/www/html/includes/database.inc on line 253.
warning: implode(): Invalid arguments passed in /var/www/html/includes/database.inc on line 253.
warning: array_keys() expects parameter 1 to be array, null given in /var/www/html/modules/user/user.module on line 528.
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 role r INNER JOIN permission p ON p.rid = r.rid WHERE r.rid IN () in /var/www/html/modules/user/user.module on line 528.

I also updated VBO, but this is appearing on node view pages that have nothing to do with VBO.

Comments

yelvington’s picture

Project: Drupal core » Twitter
Version: 6.24 » 6.x-2.7
Component: user.module » Code

Changing this to the Twitter project, as I discovered (by disabling every module, one at a time) that turning off the Twitter module made this error message disappear. Coincidentally, a Twitter block that had been on the site disappeared about the same time as the core update, so that's more evidence.

alliax’s picture

Hi, I have simply disabled the twitter block and the error doesn't appear anymore. Sad to see it go, but that's life. Until it is resolved.. and that I lean about it.

rickmanelius’s picture

Same issue, but for me it's still there after twitter modules removed, so I'm not sure if it's purely this module at fault.

dwhutton’s picture

subscribe

fantom84’s picture

i have this error to.
when i enable the twitter module and visit my account page,i can see this error messages.
when i disable the twitter module - error message gone

b0b’s picture

If you change the argument validation to Basic instead of php it works, which is fine for me since I'm using a fixed entry for the uid.

xurizaemon’s picture

Status: Active » Closed (duplicate)

Duplicated by #1707098: Restore Views UID validatory, use $argument rather than arg(1), but that one has a patch so it wins :P

You'll need to manually modify the argument validator for your view with this code if you already have a "tweets" view enabled -

$uid = $argument;
if (!empty($uid)) {
  $account = user_load($argument);
  $twitter_accounts = twitter_twitter_accounts($account);
  if (count($twitter_accounts)) {
    return TRUE;
  }
  else {
    return FALSE;
  }
}