array_keys(): The first argument should be an array in /home/[domainuser]/public_html/modules/user.module on line 349

and then this comes as well

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 /home/socialis/public_html/includes/database.mysql.inc on line 120.

I just installed the cvs version today but I assume it is 4.7 as you as you said. Still its doesnt seem to be.

Comments

jsbthree’s picture

Yes it was the one you uploaded today..

robert castelo’s picture

I've uploaded a new version - wait until tomorrow to download, or get it directly from cvs.

If you do still see any error messages, make sure to include which page was affected when you report the bug.

zzlong’s picture

I grabbed user.module from CVS today and still got the same error messages in administer -> comment -> configure.

I noticed that in the forum many ppl said this problem relates to the private message module. However I don't have this module in my 4.7.2 system.

My drupal was updated from 4.7 RC which was a fresh installation.

robert castelo’s picture

Status: Active » Fixed

zzlong no idea what you are talking about. I think you've posted to the wrong place.

Anonymous’s picture

Status: Fixed » Closed (fixed)
chrislynch’s picture

Status: Closed (fixed) » Active

Tried the latest CVS code today and got the same issue ?

chrislynch’s picture

This is the output after trying to do ?q=logout

Warning: array_keys() [function.array-keys]: The first argument should be an array in E:\XAMPP\xampp\htdocs\drupal_ecommerce\modules\user.module on line 351

Warning: implode() [function.implode]: Bad arguments. in E:\XAMPP\xampp\htdocs\drupal_ecommerce\modules\user.module on line 351

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 E:\XAMPP\xampp\htdocs\drupal_ecommerce\includes\database.mysql.inc on line 120

Warning: Cannot modify header information - headers already sent by (output started at E:\XAMPP\xampp\htdocs\drupal_ecommerce\modules\user.module:351) in E:\XAMPP\xampp\htdocs\drupal_ecommerce\includes\common.inc on line 266

chrislynch’s picture

Status: Active » Needs review

Try this fix - need to replace line 351 in user.module CVS version with this block of code

if (!is_array($account->roles)){
  		$accountroles = array($account->roles);
  	}
  	else
  	{
  		$accountroles = $account->roles;
   	}
    $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($accountroles)));

Appears to restore normal logout functionality (which was my issue), presume it will cover all instances of this error message.

robert castelo’s picture

Status: Needs review » Closed (fixed)

Does any of this have anything to do with News Page module?

Closing the issue.

Rosamunda’s picture

Status: Closed (fixed) » Active

The problem is still there.
I have the same problem with comment module, trying to enter admin/comment/config area

Rosamunda’s picture

Check out this post, I´ve got a very similar problem with comments module and there I´ve got the solution :-)

Rosamunda
Buenos Aires

robert castelo’s picture

Status: Active » Closed (won't fix)

Does this issue have anything to do with News Page module?