mirror of
https://github.com/silverstripe/silverstripe-mathspamprotection
synced 2024-10-22 08:05:52 +02:00
Merge pull request #54 from Juanitou/pr
Actually enforce strict numeric comparison for answer
This commit is contained in:
commit
68ad231dfd
@ -157,7 +157,7 @@ class MathSpamProtectorField extends TextField
|
|||||||
|
|
||||||
$word = MathSpamProtectorField::digit_to_word($v1 + $v2);
|
$word = MathSpamProtectorField::digit_to_word($v1 + $v2);
|
||||||
|
|
||||||
return ($word == strtolower($answer) || ($this->config()->get('allow_numeric_answer') && (($v1 + $v2) === $answer)));
|
return ($word == strtolower($answer) || ($this->config()->get('allow_numeric_answer') && (($v1 + $v2) === intval($answer))));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user