Title: mailhide.php:258 Undefined variable: needed_capability
Last modified: August 21, 2016

---

# mailhide.php:258 Undefined variable: needed_capability

 *  [Clement Gonnet](https://wordpress.org/support/users/renoovodesign/)
 * (@renoovodesign)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/mailhidephp258-undefined-variable-needed_capability/)
 * Undefined variable: needed_capability in wp-recaptcha/mailhide.php on line 258
   
   This variable is not defined when the **target** checkbox “Show actual email 
   addresses to Registered Users who can …” is left unticked.
 * This fixed it
    Add this in recaptcha/mailhide.php line 249: `$needed_capability
   = '';`
 * Explanation: the $needed_capability was declared in the if statement, only when
   the condition was true. The variable needs to be declared in the mailhide_emails
   function context instead.
 * [https://wordpress.org/plugins/wp-recaptcha/](https://wordpress.org/plugins/wp-recaptcha/)

The topic ‘mailhide.php:258 Undefined variable: needed_capability’ is closed to 
new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-recaptcha.svg)
 * [WP-reCAPTCHA](https://wordpress.org/plugins/wp-recaptcha/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-recaptcha/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-recaptcha/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-recaptcha/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-recaptcha/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-recaptcha/reviews/)

## Tags

 * [MailHide](https://wordpress.org/support/topic-tag/mailhide/)

 * 0 replies
 * 1 participant
 * Last reply from: [Clement Gonnet](https://wordpress.org/support/users/renoovodesign/)
 * Last activity: [11 years, 10 months ago](https://wordpress.org/support/topic/mailhidephp258-undefined-variable-needed_capability/)
 * Status: not resolved