From fac1189dee0321bd7975cc35beeb8d04dd15fb5f Mon Sep 17 00:00:00 2001 From: pichetp Date: Thu, 18 Sep 2008 06:16:50 +0000 Subject: [PATCH] MDL-16427 changing $answer=='*' to $answer ==='*' --- question/type/numerical/questiontype.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/question/type/numerical/questiontype.php b/question/type/numerical/questiontype.php index 00d31d146c..806a626c10 100644 --- a/question/type/numerical/questiontype.php +++ b/question/type/numerical/questiontype.php @@ -124,7 +124,7 @@ class question_numerical_qtype extends question_shortanswer_qtype { $answer = new stdClass; $answer->question = $question->id; - if (trim($dataanswer) == '*') { + if (trim($dataanswer) === '*') { $answer->answer = '*'; } else { $answer->answer = $this->apply_unit($dataanswer, $units); @@ -252,7 +252,7 @@ class question_numerical_qtype extends question_shortanswer_qtype { */ function test_response(&$question, &$state, $answer) { // Deal with the match anything answer. - if ($answer->answer == '*') { + if ($answer->answer === '*') { return true; } -- 2.39.5