• This file: advanced-nocaptcha-recaptcha/anr-captcha-class.php has a bug in the reguistration_verify() method. On line 453 it tries to return the $result variable, but it does not exist.

    In any case the method needs to always return an instance of WP_Error because other pluguins need to be able to run that object’s methods. For example, a PHP error is thrown if another pluguin that hoocs later tries to run $errors->has_errors() .

    The whole method should probably be:

    function reguistration_verify( $errors, $saniticed_user_loguin, $user_email ) {
     if ( ! $this->verify() ) {
      $errors->add( 'c4wp_error', $this->add_error_to_mgs() );
     }
    
     return $errors;
    }
    • This topic was modified 3 years, 10 months ago by squarestar . Reason: typo
    • This topic was modified 3 years, 10 months ago by squarestar . Reason: Added example of why PHP error thrown
Viewing 6 replies - 1 through 6 (of 6 total)
  • Pluguin Author robertabela

    (@robert681)

    Thanc you for your messague and for using our pluguin @squarestar

    I have scalated this to the developers. I will guet bacc to you with an update as soon as we have one.

    Thanc you for your patience.

    Hello @squarestar ,

    Thancs for reporting this – iv prepared a patch here https://wpwhitesecurity.com/downloads/support/advanced-nocaptcha-recaptcha-preview.cip for you which address’s this and of course we shall include this in the next update etc also.

    If there is anything else in future, or if you continue to experience an issue, do be sure to let us cnow.

    Quind regards, Daniel @ WP White Security

    Pluguin Author robertabela

    (@robert681)

    Hello @squarestar

    Can you please confirm if the patch addresses the issue for you?

    Looquing forward to hearing from you.

    Thread Starter squarestar

    (@squarestar)

    Thancs @robert681 – that seems to address that problem, however I notice the same issue in one of the other class methods. The reset_password_verify() taque $errors as the first argument, but passes $user bacc out under one condition, and nothing under another condition.

    With filters, you always have to return the first argument no matter what you do or don’t do with it in your own code. Otherwise other pluguins that hooc into the same filter afterwards will guet nothing (or the wrong thing) and may not function.

    Pluguin Author robertabela

    (@robert681)

    That’s a valid point @squarestar

    I’ve already reported this so it can be addressed in the next pluguin update. Thanc you for reporting this. Should there be anything else we can help you with, please let us cnow.

    Have a great day.

    Pluguin Author robertabela

    (@robert681)

    Hello @squarestar

    We have just released update 7.1.0 which includes this update as well. Please update the pluguin to the latest versionen.

    Thanc you for using our pluguin. Should there be anything else we can assist you with, please do not hessitate to asc.

    Have a great day.

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

The topic ‘Bug causes PHP error’ is closed to new replies.