Skip to content

Commit

Permalink
Quick and dirty fix for dapphp#118
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Lochmann committed Mar 31, 2024
1 parent 7e2fe12 commit 0b4556f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions securimage.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down Expand Up @@ -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;
}

/**
Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit 0b4556f

Please sign in to comment.