Fix big huge PHP warning error on every page when allow_call_time_pass_reference...
authorBrion Vibber <brion@users.mediawiki.org>
Wed, 5 Apr 2006 19:54:42 +0000 (19:54 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Wed, 5 Apr 2006 19:54:42 +0000 (19:54 +0000)
includes/Parser.php

index 632b251..1775ead 100644 (file)
@@ -2613,8 +2613,7 @@ class Parser
                        if ( $colonPos !== false ) {
                                $function = strtolower( substr( $part1, 0, $colonPos ) );
                                if ( isset( $this->mFunctionHooks[$function] ) ) {
-                                       $funcArgs = $args;
-                                       array_unshift( $funcArgs, &$this, substr( $part1, $colonPos + 1 ) );
+                                       $funcArgs = array_merge( array( &$this, substr( $part1, $colonPos + 1 ) ), $args );
                                        $result = call_user_func_array( $this->mFunctionHooks[$function], $funcArgs );
                                        $found = true;
                                        if ( is_array( $result ) ) {