From b28ab61f58422fb2a459454c04c16edf3afc19fd Mon Sep 17 00:00:00 2001 From: Arne Heizmann Date: Tue, 10 Aug 2004 22:48:02 +0000 Subject: [PATCH] With &debugmsg=1, PHP output a warning because the link trail no longer constituted a valid regular expression; fix that --- includes/GlobalFunctions.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index a32fa8c263..7508fb9f60 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -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 ); -- 2.20.1