When I click save on the configuartion page at

http://kbvrdev.localhost:8082/admin/settings/masquerade

I get :

warning: Invalid argument supplied for foreach() in D:\BackThisUp\wwwroot\AcquiaDrupalSites\acquia-drupal\sites\all\modules\masquerade\masquerade.module on line 188.

When I switch a user using the block I get this

warning: Invalid argument supplied for foreach() in D:\BackThisUp\wwwroot\AcquiaDrupalSites\acquia-drupal\sites\all\modules\masquerade\masquerade.module on line 382.

I am using the acqua installation on a wamp stack.

Tom

Comments

buckley’s picture

This code occurs on the lines mentioned

line 188

foreach ((variable_get('masquerade_quick_switches', array())) as $uid) {

line 382

foreach ($masquerade_switches as $switch_user) {

Is $masquerade_switches somehow not good?

deviantintegral’s picture

Are you actually using HEAD? It's a work-in-progress branch for Drupal 7, and will not work at all on Drupal 6.

Otherwise, please download the 6.x-1.x-dev release to see if that fixes your problem.

buckley’s picture

Installing the latest dev version made the problem go away.

I spent some time figuring this out and come to a first conclusion that someting was wrong with variable_get('masquerade_quick_switches'). Somehow this var would get set correctly and the rest of the code assumed it was.

Thanks for the tip deviantinegral

deviantintegral’s picture

Status: Active » Closed (duplicate)

Great - marking as a duplicate of #565860: Block quick switch users not properly saved.