mirror of
https://github.com/silverstripe/silverstripe-mathspamprotection
synced 2024-10-22 08:05:52 +02:00
Add strtolower to allow answers with Capital letter
This commit is contained in:
parent
e571210f12
commit
db7ec20399
@ -107,7 +107,7 @@ class MathSpamProtectorField extends SpamProtectorField {
|
|||||||
Session::clear('mathQuestionV1');
|
Session::clear('mathQuestionV1');
|
||||||
Session::clear('mathQuestionV2');
|
Session::clear('mathQuestionV2');
|
||||||
|
|
||||||
return (MathSpamProtectorField::digit_to_word($v1 + $v2) == $answer || ($v1 + $v2) == $answer);
|
return (MathSpamProtectorField::digit_to_word($v1 + $v2) == strtolower($answer) || ($v1 + $v2) == $answer);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -158,4 +158,4 @@ class MathSpamProtectorField extends SpamProtectorField {
|
|||||||
public static function set_enabled($enabled = true) {
|
public static function set_enabled($enabled = true) {
|
||||||
self::$enabled = $enabled;
|
self::$enabled = $enabled;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user