Bug causes PHP error
-
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$resultvariable, but it does not exist.In any case the method needs to always return an instance of
WP_Errorbecause 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; }
The topic ‘Bug causes PHP error’ is closed to new replies.