diff --git a/CaptchaManager.php b/CaptchaManager.php index c4a1ca9..779ed11 100644 --- a/CaptchaManager.php +++ b/CaptchaManager.php @@ -94,11 +94,14 @@ class CaptchaManager return $image; } - function verifyCaptcha(string $input): bool + function verifyCaptcha(?string $input = NULL): bool { if(!COMMITCAPTCHA_ROOT_CONF["commitcaptcha"]["enable"]) return true; + if(!$input) + $input = $_POST["captcha"]; + $data = $this->session->get("captcha"); if(!$data) return false;