Support » Plugin: User Switching » Cannot modify header information when switching users

  • Resolved krko

    (@krko)


    Hey guys,

    Until recently had no trouble at all using the plugin but recently when switching I get this error:

    Warning: Invalid argument supplied for foreach() in /path-to/wp-admin/includes/plugin.php on line 1554

    Warning: Cannot modify header information – headers already sent by (output started at /path-to/wp-admin/includes/plugin.php:1554) in /path-to/wp-includes/pluggable.php on line 1219

    Line 1554 in plugin.php is: foreach ( $submenu[$parent] as $submenu_array ) {
    Line 1219 in pluggable.php is: header(“Location: $location”, true, $status);

    I’d appreciate your help.

    krko

Viewing 3 replies - 1 through 3 (of 3 total)
  • Just to add some more information, the user is actually switched, so if I go manually to url/my-account/ I’m in the new user account and the switch back link works fine.

    krko

    Plugin Author John Blackbourn

    (@johnbillion)

    WordPress Core Developer

    It sounds like another plugin or the theme on your site is triggering output when it shouldn’t. Can you try deactivating your other plugins one by one to try to identify the culprit?

    Thanks, I’ll have to create a staging for that one. It’s gonna be a loooong day 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Cannot modify header information when switching users’ is closed to new replies.