• Resolved Gary Kealy

    (@ylkyrg)


    WP 6.1.1
    PHP 8.0
    hCaptcha plugin 2.6.0

    Error triggered on login:

    An error of type E_ERROR was caused in line 108 of the file [...]/hcaptcha-for-forms-and-more/src/php/Abstracts/LoginBase.php. Error message: Uncaught TypeError: array_filter(): Argument #1 ($array) must be of type array, null given in [...]/hcaptcha-for-forms-and-more/src/php/Abstracts/LoginBase.php:108
    Stack trace:
    #0 [...]/hcaptcha-for-forms-and-more/src/php/Abstracts/LoginBase.php(108): array_filter(NULL, Object(Closure))
    #1 [...]/hcaptcha-for-forms-and-more/src/php/WP/Login.php(49): HCaptcha\Abstracts\LoginBase->is_login_limit_exceeded()
    #2 [...]/wp-includes/class-wp-hook.php(308): HCaptcha\WP\Login->add_captcha('')
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor kaggdesign

    (@kaggdesign)

    I spent an more than an hour trying to guess how it can arise – and no idea from the code.

    Can you provide a sequence to reproduce the bug?

    Also, you can delete the option and try to see what will happen: wp option delete hcaptcha_login_data.

    • This reply was modified 1 year, 8 months ago by kaggdesign.
    Plugin Contributor kaggdesign

    (@kaggdesign)

    I have added an additional check to the code, it should help. It will be published in v2.7.0 in days.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Uncaught TypeError LoginBase.php:108’ is closed to new replies.