From db7ec20399d4c201064f2348dd8bf5b2c4e28b13 Mon Sep 17 00:00:00 2001 From: RuthAdele Date: Tue, 24 Sep 2013 18:51:31 +0930 Subject: [PATCH] Add strtolower to allow answers with Capital letter --- code/MathSpamProtectorField.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/MathSpamProtectorField.php b/code/MathSpamProtectorField.php index 91bdcf0..0c21d72 100644 --- a/code/MathSpamProtectorField.php +++ b/code/MathSpamProtectorField.php @@ -107,7 +107,7 @@ class MathSpamProtectorField extends SpamProtectorField { Session::clear('mathQuestionV1'); 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) { self::$enabled = $enabled; } -} \ No newline at end of file +}