Bug causes PHP error
-
This file: advanced-nocaptcha-recaptcha/anr-captcha-class.php has a bug in the
registration_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 plugins need to be able to run that object’s methods. For example, a PHP error is thrown if another plugin that hooks later tries to run$errors->has_errors()
.The whole method should probably be:
function registration_verify( $errors, $sanitized_user_login, $user_email ) { if ( ! $this->verify() ) { $errors->add( 'c4wp_error', $this->add_error_to_mgs() ); } return $errors; }
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Bug causes PHP error’ is closed to new replies.