Closed (duplicate)
Project:
Masquerade
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
11 Jun 2010 at 04:55 UTC
Updated:
24 Dec 2010 at 13:43 UTC
Hey everyone,
When switching to another user using the Masquerade block, I'm receiving the following error message at the top of the page:
Warning: array_flip(): Can only flip STRING and INTEGER values! in DrupalDefaultEntityController->load() (line 104 of /home/sandboxes/sandbox10/public_html/includes/entity.inc).
Despite the error message, I'm able to successfully switch to another user. So the error message doesn't appear to affect any functionality. But any ideas why it is occurring?
Thanks,
Ben
P.S. I'm using Drupal 7.0-alpha5.
Comments
Comment #1
BenK commentedComment #2
deekayen commentedEntities can be users in D7, so I suspect this is happening in
masquerade_switch_user(), and more specifically at$new_user = user_load($uid);since that's the only load function in there. What's puzzling to me is that there's ais_numeric()before it gets to theuser_load(), so perhaps it's not erroring in the switch_user() function at all...Comment #3
deviantintegral commentedThere are a few places where we do user_load($username) instead of user_load_by_name($username). That's probably part of the issue.
http://api.drupal.org/api/function/user_load_by_name/7
Comment #4
andypostShould be fixed with #1006668: General code cleanup and wish to make D7rc1 release
Comment #5
deekayen commentedI committed #1006668: General code cleanup and wish to make D7rc1 release