diff --git a/core/captcha.php b/core/captcha.php index c731ab6e..ad35428e 100644 --- a/core/captcha.php +++ b/core/captcha.php @@ -40,7 +40,7 @@ function captcha_check(): bool $r_privatekey = $config->get_string('api_recaptcha_privkey'); if (!empty($r_privatekey)) { $recaptcha = new ReCaptcha($r_privatekey); - $resp = $recaptcha->verify($_POST['g-recaptcha-response'], $_SERVER['REMOTE_ADDR']); + $resp = $recaptcha->verify($_POST['g-recaptcha-response'] ?? "", $_SERVER['REMOTE_ADDR']); if (!$resp->isSuccess()) { log_info("core", "Captcha failed (ReCaptcha): " . implode("", $resp->getErrorCodes()));