Skip to content

Commit

Permalink
Merge branch 'release/7.1.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
rhukster committed Jan 8, 2023
2 parents 4b51c49 + c6f4069 commit 262bf6d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# v7.1.2
## 01/08/2023

1. [](#bugfix)
* Fixes issue with multiplication type BasicCaptcha Math Captcha [#587](https://github.com/getgrav/grav-plugin-form/issues/587)

# v7.1.1
## 11/29/2022

Expand Down
2 changes: 1 addition & 1 deletion blueprints.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Form
slug: form
type: plugin
version: 7.1.1
version: 7.1.2
description: Enables forms handling and processing
icon: check-square
author:
Expand Down
12 changes: 6 additions & 6 deletions classes/BasicCaptcha.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,20 @@ public function getCaptchaCode($length = null): string
// calculator
if ($operator === '-') {
if ($first_num < $second_num) {
$result = "$second_num-$first_num";
$captcha_code = $second_num-$first_num;
$result = "$second_num - $first_num";
$captcha_code = $second_num - $first_num;
} else {
$result = "$first_num-$second_num";
$captcha_code = $first_num - $second_num;
}
} elseif ($operator === '*') {
$result = "{$first_num}x{$second_num}";
$captcha_code = $first_num - $second_num;
$result = "{$first_num} x {$second_num}";
$captcha_code = $first_num * $second_num;
} elseif ($operator === '/') {
$result = "$first_num/ second_num";
$result = "$first_num / second_num";
$captcha_code = $first_num / $second_num;
} elseif ($operator === '+') {
$result = "$first_num+$second_num";
$result = "$first_num + $second_num";
$captcha_code = $first_num + $second_num;
}
} else {
Expand Down

0 comments on commit 262bf6d

Please sign in to comment.