Support » Plugin: Banhammer » User Switching Plugin Issue with Banhammer

  • Resolved holisticmissions

    (@holisticmissions)


    When I use the User Switching plugin (https://wordpress.org/plugins/user-switching/) to switch to a user everything works fine until I try to switch back to my Admin account. When I do I get the error “There has been a critical error on your website. Please check your site admin email inbox for instructions.” but can go to the wp-admin page and it loads my Admin account just fine. Disabling Banhammer stops the issue from occurring.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Jeff Starr

    (@specialk)

    What exactly is the critical error? You should receive an email from your WP site indicating the nature and description of the error.

    An error of type E_ERROR was caused in line 721 of the file /home/sitename/webapps/sitename/wp-content/plugins/user-switching/user-switching.php. Error message: Uncaught TypeError: Argument 1 passed to user_switching::filter_removable_query_args() must be of the type array, null given, called in /home/sitename/webapps/sitename/wp-includes/class-wp-hook.php on line 287 and defined in /home/sitename/webapps/sitename/wp-content/plugins/user-switching/user-switching.php:721

    Plugin Author Jeff Starr

    (@specialk)

    Yeah looking at those errors, it is something that is happening on the “user-switching” plugin side of things. There is not much I can do about it from the BH side. Best advice is to report the error to the user-switching developers, they will know best how to resolve the issue. Let me know if I can provide any further infos about Banhammer, glad to help anytime.

    John Blackbourn

    (@johnbillion)

    WordPress Core Developer

    Banhammer is returning an invalid value from its removable_query_args filter.

    See https://developer.wordpress.org/reference/hooks/removable_query_args/. null is not an allowed return value for this filter.

    Plugin Author Jeff Starr

    (@specialk)

    Ah, thank you. Will change it to return an empty array instead.

    Plugin Author Jeff Starr

    (@specialk)

    Just to follow up, this issue is resolved in the next version of Banhammer. Should be released today or tomorrow. Thanks @holisticmissions and @johnbillion.

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.