From 0b4556f8e7f91aab7ba6712bf4b8b59d404fb395 Mon Sep 17 00:00:00 2001 From: Alexander Lochmann Date: Sun, 31 Mar 2024 23:08:42 +0200 Subject: [PATCH] Quick and dirty fix for #118 --- securimage.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/securimage.php b/securimage.php index 1794fc6..60107fb 100644 --- a/securimage.php +++ b/securimage.php @@ -1032,8 +1032,8 @@ public function check($code, $captchaId = null, $alwaysDelete = false) $code = ''; } - $this->code_entered = $code; - $this->correct_code = false; + $code_entered = $code; + $correct_code = false; $this->code = null; if (empty($captchaId)) { @@ -1070,13 +1070,13 @@ public function check($code, $captchaId = null, $alwaysDelete = false) ); } - if ($this->correct_code === false && $alwaysDelete) { + if ($correct_code === false && $alwaysDelete) { // clear code from storage after use // if correct_code === true, it has already been deleted $this->deleteData($captchaId); } - return $this->correct_code; + return $correct_code; } /** @@ -2377,8 +2377,8 @@ protected function validate($captchaId) $this->case_sensitive = true; } - $code_entered = trim( (($this->case_sensitive) ? $this->code_entered - : strtolower($this->code_entered)) + $code_entered = trim( (($this->case_sensitive) ? $code_entered + : strtolower($code_entered)) ); $this->correct_code = false;