From 644360c9c00e4b29cc630e4109fc3b334278ba03 Mon Sep 17 00:00:00 2001 From: Jarkko Linnanvirta Date: Mon, 31 Aug 2015 17:09:40 +0300 Subject: [PATCH] Update MathSpamProtectorField.php --- code/MathSpamProtectorField.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/code/MathSpamProtectorField.php b/code/MathSpamProtectorField.php index 00988f5..6570c7a 100644 --- a/code/MathSpamProtectorField.php +++ b/code/MathSpamProtectorField.php @@ -133,8 +133,7 @@ class MathSpamProtectorField extends TextField { $word = MathSpamProtectorField::digit_to_word($v1 + $v2); - $allow_numeric_answer = Config::inst()->get('MathSpamProtectorField', 'allow_numeric_answer'); - return ($word == strtolower($answer) || ((($v1 + $v2) == $answer) and $allow_numeric_answer)); + return ($word == strtolower($answer) || (Config::inst()->get('MathSpamProtectorField', 'allow_numeric_answer') && (($v1 + $v2) == $answer))); } /**