Siebrand has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/275804

Change subject: Some additional identical comparisons
......................................................................

Some additional identical comparisons

[Will be squashed into parent if tests run okay]

Change-Id: I8ff56a10329937607953d853e4742083333533f7
---
M ParserFunctions_body.php
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ParserFunctions 
refs/changes/04/275804/1

diff --git a/ParserFunctions_body.php b/ParserFunctions_body.php
index cac52b4..286539e 100644
--- a/ParserFunctions_body.php
+++ b/ParserFunctions_body.php
@@ -165,7 +165,7 @@
         * @return string
         */
        public static function switchObj( $parser, $frame, $args ) {
-               if ( count( $args ) == 0 ) {
+               if ( count( $args ) === 0 ) {
                        return '';
                }
                $primary = self::decodeTrimExpand( array_shift( $args ), $frame 
);
@@ -188,7 +188,7 @@
                                        return trim( $frame->expand( $valueNode 
) );
                                } else {
                                        $test = self::decodeTrimExpand( 
$nameNode, $frame );
-                                       if ( $test == $primary ) {
+                                       if ( $test === $primary ) {
                                                # Found a match, return now
                                                return trim( $frame->expand( 
$valueNode ) );
                                        } elseif ( $defaultFound || 
$mwDefault->matchStartToEnd( $test ) ) {
@@ -202,7 +202,7 @@
                                $lastItemHadNoEquals = true;
                                // $lastItem is an "out" variable
                                $decodedTest = self::decodeTrimExpand( 
$valueNode, $frame, $lastItem );
-                               if ( $decodedTest == $primary ) {
+                               if ( $decodedTest === $primary ) {
                                        $found = true;
                                } elseif ( $mwDefault->matchStartToEnd( 
$decodedTest ) ) {
                                        $defaultFound = true;

-- 
To view, visit https://gerrit.wikimedia.org/r/275804
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8ff56a10329937607953d853e4742083333533f7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ParserFunctions
Gerrit-Branch: master
Gerrit-Owner: Siebrand <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to