EditPage: Deprecate public isCssJsSubpage related member variables
[lhc/web/wiklou.git] / includes / GlobalFunctions.php
index fa97515..484dfe8 100644 (file)
@@ -195,11 +195,15 @@ function wfArrayDiff2_cmp( $a, $b ) {
        } else {
                reset( $a );
                reset( $b );
-               while ( ( list( , $valueA ) = each( $a ) ) && ( list( , $valueB ) = each( $b ) ) ) {
+               while ( key( $a ) !== null && key( $b ) !== null ) {
+                       $valueA = current( $a );
+                       $valueB = current( $b );
                        $cmp = strcmp( $valueA, $valueB );
                        if ( $cmp !== 0 ) {
                                return $cmp;
                        }
+                       next( $a );
+                       next( $b );
                }
                return 0;
        }
@@ -3160,6 +3164,7 @@ function wfShorthandToInteger( $string = '', $default = -1 ) {
 /**
  * Get the normalised IETF language tag
  * See unit test for examples.
+ * See mediawiki.language.bcp47 for the JavaScript implementation.
  *
  * @param string $code The language code.
  * @return string The language code which complying with BCP 47 standards.