Merge "Title: Refactor JS/CSS page handling to be more sane"
[lhc/web/wiklou.git] / includes / MagicWordArray.php
index 1c27833..4010ec7 100644 (file)
@@ -203,7 +203,9 @@ class MagicWordArray {
         */
        public function parseMatch( $m ) {
                reset( $m );
-               while ( list( $key, $value ) = each( $m ) ) {
+               while ( ( $key = key( $m ) ) !== null ) {
+                       $value = current( $m );
+                       next( $m );
                        if ( $key === 0 || $value === '' ) {
                                continue;
                        }
@@ -269,7 +271,7 @@ class MagicWordArray {
         * Returns an associative array, ID => param value, for all items that match
         * Removes the matched items from the input string (passed by reference)
         *
-        * @param string $text
+        * @param string &$text
         *
         * @return array
         */
@@ -313,7 +315,7 @@ class MagicWordArray {
         * Return false if no match found and $text is not modified.
         * Does not match parameters.
         *
-        * @param string $text
+        * @param string &$text
         *
         * @return int|bool False on failure
         */