Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
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
Comment #1
buckley CreditAttribution: buckley commentedThis 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?
Comment #2
deviantintegral CreditAttribution: deviantintegral commentedAre 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.
Comment #3
buckley CreditAttribution: buckley commentedInstalling 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
Comment #4
deviantintegral CreditAttribution: deviantintegral commentedGreat - marking as a duplicate of #565860: Block quick switch users not properly saved.