• Resolved technicalx

    (@technicalx)


    This error comes from failing at login, such as wrong password.

    version 3.0.8.8

    Uncaught ArgumentCountError: Too few arguments to function LoginWP\Core\Redirections\Redirections::login_failed_redirect(), 1 passed in /srv/www/***/public_html/wp-includes/class-wp-hook.php on line 341 and exactly 2 expected in /srv/www/***/public_html/wp-content/plugins/peters-login-redirect/

    Below function in Redirections.php makes no sense. $username, $error are not used at all and when they are missing there is a fatal error.

    public static function login_failed_redirect($username, $error)
    {
        if (defined('DOING_AJAX') && DOING_AJAX) return;
    
        $disable_failed_login_redirect = loginwp_var(get_option('loginwp_settings', []), 'disable_failed_login_redirect');
        if ($disable_failed_login_redirect == 'true') return;
    
        $referer = wp_get_referer();
        if ($referer) {
            $referer = add_query_arg('login', 'failed', $referer);
            wp_redirect($referer);
            exit;
        }
    }

    should be ($username=null, $error=null) or something better.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Mej de Castro

    (@mej)

    Hi @technicalx,

    Thanks for reaching out to us. Could you please let us know if you’ve tried enabling or disabling the Failed Login Redirect option in the LoginWP settings?

    We’d like to confirm whether this feature might be causing the errors you’re experiencing.

    We look forward to your update!

    Kind Regards,
    Mej, LoginWP Team

    Plugin Author Mej de Castro

    (@mej)

    Hi @technicalx,

    I hope you’re doing well. Just pinging to see if you had a chance to review my previous message.

    Please let me know if you have any updates or if there’s anything else I can assist you with.

    Kind Regards,
    Mej, LoginWP Team

Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.