Title: [Plugin: WP-reCAPTCHA] Undefined variable errors
Last modified: August 19, 2016

---

# [Plugin: WP-reCAPTCHA] Undefined variable errors

 *  [wongo888](https://wordpress.org/support/users/wongo888/)
 * (@wongo888)
 * [16 years, 5 months ago](https://wordpress.org/support/topic/plugin-wp-recaptcha-undefined-variable-errors/)
 * I just installed the recaptcha plugin and I’m getting some warnings ahead of 
   the captcha widget which is showing up:
 * `Notice: Undefined variable: needed_capability in /...../public/blog/wp-content/
   plugins/wp-recaptcha/wp-recaptcha.php on line 438`
 * `Notice: Undefined index: rerror in /....../public/blog/wp-content/plugins/wp-
   recaptcha/wp-recaptcha.php on line 443`
 * `Notice: Undefined index: rerror in /...../public/blog/wp-content/plugins/wp-
   recaptcha/wp-recaptcha.php on line 494`
 * I looked at the code and on line 430 of the ‘wp-recaptch.php’ file is the following:
 *     ```
       function recaptcha_comment_form() {
          global $user_ID, $recaptcha_opt;
   
          // set the minimum capability needed to skip the captcha if there is one
          if ($recaptcha_opt['re_bypass'] && $recaptcha_opt['re_bypasslevel'])
             $needed_capability = $recaptcha_opt['re_bypasslevel'];
   
       	// skip the reCAPTCHA display if the minimum capability is met
       	if (($needed_capability && current_user_can($needed_capability)) || !$recaptcha_opt['re_comments'])
       		return;
       ```
   
 * It appears that the variable $needed_capability is not being set up because $
   recaptcha_opt[‘re_bypass’] is not TRUE. It is actually NULL. $recaptcha_opt[‘
   re_bypasslevel’] is set to ‘read’. It appears to me that if $recaptcha_opt[‘re_bypass’]
   is NULL then $needed_capability is never set although it is tested in the following
   line (438).
 * Is there a default $needed_capability set somewhere that is not being picked 
   up? Thanks for any help!
 * [http://wordpress.org/extend/plugins/wp-recaptcha/](http://wordpress.org/extend/plugins/wp-recaptcha/)

Viewing 1 replies (of 1 total)

 *  [chestersstore28](https://wordpress.org/support/users/chestersstore28/)
 * (@chestersstore28)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/plugin-wp-recaptcha-undefined-variable-errors/#post-1262343)
 * I am getting this error – any ideas on how I resolve this?
 * Webpage error details
 * User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; GTB6;
   SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; InfoPath.2; .NET CLR 3.5.30729;.
   NET CLR 3.0.30618)
    Timestamp: Fri, 4 Dec 2009 20:26:27 UTC
 * Message: ‘wp’ is undefined
    Line: 78 Char: 1 Code: 0 URI: [https://wendygould.magellanshop.com/blog/wp-content/themes/swift/includes/js-functions.js](https://wendygould.magellanshop.com/blog/wp-content/themes/swift/includes/js-functions.js)

Viewing 1 replies (of 1 total)

The topic ‘[Plugin: WP-reCAPTCHA] Undefined variable errors’ is closed to new replies.

 * 1 reply
 * 2 participants
 * Last reply from: [chestersstore28](https://wordpress.org/support/users/chestersstore28/)
 * Last activity: [16 years, 4 months ago](https://wordpress.org/support/topic/plugin-wp-recaptcha-undefined-variable-errors/#post-1262343)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
