With &debugmsg=1, PHP output a warning because the link trail no longer
authorArne Heizmann <timwi@users.mediawiki.org>
Tue, 10 Aug 2004 22:48:02 +0000 (22:48 +0000)
committerArne Heizmann <timwi@users.mediawiki.org>
Tue, 10 Aug 2004 22:48:02 +0000 (22:48 +0000)
constituted a valid regular expression; fix that

includes/GlobalFunctions.php

index a32fa8c..7508fb9 100644 (file)
@@ -290,7 +290,12 @@ $wgReplacementKeys = array( "$1", "$2", "$3", "$4", "$5", "$6", "$7", "$8", "$9"
 function wfMsg( $key ) {
        global $wgRequest;
        if ( $wgRequest->getVal( 'debugmsg' ) )
-               return $key;
+       {
+               if ( $key == 'linktrail' /* a special case where we want to return something specific */ )
+                       return "/^()(.*)$/sD";
+               else
+                       return $key;
+       }
        $args = func_get_args();
        if ( count( $args ) ) {
                array_shift( $args );