Hi,

I have copied my local test site to a test server and get the following error message when I try to views the site as an anonymous user, which basically locks the site:

    * warning: array_fill() [function.array-fill]: Number of elements must be positive in /is/htdocs/wp1190225_BUAN3F0QC8/www/test_testsite/includes/database.inc on line 253.
    * warning: implode() [function.implode]: Invalid arguments passed in /is/htdocs/wp1190225_BUAN3F0QC8/www/test_testsite/includes/database.inc on line 253.
    * warning: array_keys() [function.array-keys]: The first argument should be an array in /is/htdocs/wp1190225_BUAN3F0QC8/www/test_testsite/modules/user/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 role r INNER JOIN permission p ON p.rid = r.rid WHERE r.rid IN () in /is/htdocs/wp1190225_BUAN3F0QC8/www/test_testsite/modules/user/user.module on line 502.

I am not positive that this error comes from gmaps module; but as soon as I disable it all works perfectly again.

Comments

xmarket’s picture

I'm unable to reproduce.

Can you add the following lines to user_access() in user.module on your test site and post the output?

  if (!isset($account)) {
    $account = $user;
  }
  //test start
  if (!property_exists($account, 'roles') || !is_array($account->roles) || empty($account->roles)) {
    print_r($user);
    print_r(debug_backtrace());
    exit();
  }
  //test end
xmarket’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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