From 9e2565d84d97210e00c76147b8d7fb0844f06c95 Mon Sep 17 00:00:00 2001 From: Mihail Geshoski Date: Tue, 14 Nov 2017 16:31:13 +0800 Subject: [PATCH] MDL-60675 analytics: Apply strict comparison check --- lib/outputcomponents.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/outputcomponents.php b/lib/outputcomponents.php index 055e8da2076..941375b5c20 100644 --- a/lib/outputcomponents.php +++ b/lib/outputcomponents.php @@ -1137,7 +1137,7 @@ class single_select implements renderable, templatable { 'selected' => strval($this->selected) === strval($optvalue), ]; - if ($hasnothing && $nothingkey == $optvalue) { + if ($hasnothing && $nothingkey === $optvalue) { $option['ignore'] = 'data-ignore'; } @@ -1157,7 +1157,7 @@ class single_select implements renderable, templatable { 'optgroup' => false ]; - if ($hasnothing && $nothingkey == $value) { + if ($hasnothing && $nothingkey === $value) { $option['ignore'] = 'data-ignore'; }