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!