diff --git a/plugins/kj_recaptcha/init.php b/plugins/kj_recaptcha/init.php index 871e64e..c82c80b 100644 --- a/plugins/kj_recaptcha/init.php +++ b/plugins/kj_recaptcha/init.php @@ -336,11 +336,11 @@ if(! function_exists('getReCaptchaInputHtml')) if($config['kj_recaptcha_invisible'] == 1) { - return '
'; + return ''; } else { - return ''; + return ''; } } @@ -415,10 +415,13 @@ if (!function_exists('isReCaptchaValid')) { { global $config; - if(!ip('g-recaptcha-response') || empty(p('g-recaptcha-response'))){ - return false; + if(empty($config['kj_recaptcha_sitekey']) || empty($config['kj_recaptcha_secret'])){ + return true; } + if (!ip('g-recaptcha-response') || empty(p('g-recaptcha-response'))) { + return false; + } try { $data = array(