I just upgraded my test site from version 4.6.6 to version 4.7.2. With the exception of a couple of errors on the upgrade log, everything seemed to go through without a hitch.
When I logged into the site as a user other than user number 1 after the upgrade, however, I was presented with the following errors:
* warning: array_keys() [function.array-keys]: The first argument should be an array in [my site path]/modules/user.module on line 349.
* warning: implode() [function.implode]: Bad arguments. in [my site path]/modules/user.module on line 349.
* 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 [my site path]/includes/database.mysql.inc on line 120.
FYI, line 349 in the user.module file reads as follows:
$result = db_query("SELECT DISTINCT(p.perm) FROM {role} r INNER JOIN {permission} p ON p.rid = r.rid WHERE r.rid IN (%s)",
implode(',', array_keys($account->roles)));
And line 120 in the database.mysql.inc file is:
trigger_error(check_plain(mysql_error($active_db) ."\nquery: ". $query), E_USER_WARNING);
Has anyone else encountered these (or similar) errors? Or does anyone have any thoughts as to what I need to do to resolve them?