Navigation Menu

Skip to content

Commit

Permalink
MDL-16427 changing $answer=='*' to $answer ==='*'
Browse files Browse the repository at this point in the history
  • Loading branch information
pichetp committed Sep 18, 2008
1 parent fe4550b commit 253df4f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions question/type/numerical/questiontype.php
Expand Up @@ -115,7 +115,7 @@ function save_question_options($question) {

$answer = new stdClass;
$answer->question = $question->id;
if (trim($dataanswer) == '*') {
if (trim($dataanswer) === '*') {
$answer->answer = '*';
} else {
$answer->answer = $this->apply_unit($dataanswer, $units);
Expand Down Expand Up @@ -242,7 +242,7 @@ function compare_responses(&$question, $state, $teststate) {
*/
function test_response(&$question, &$state, $answer) {
// Deal with the match anything answer.
if ($answer->answer == '*') {
if ($answer->answer === '*') {
return true;
}

Expand Down

0 comments on commit 253df4f

Please sign in to comment.