From: Alexandre Emsenhuber Date: Mon, 26 Mar 2012 18:26:32 +0000 (+0200) Subject: * (bug 35446) Using "{{nse:}}" with an invalid namespace name no longer throws a... X-Git-Tag: 1.31.0-rc.0~24123 X-Git-Url: http://git.cyclocoop.org/%24self?a=commitdiff_plain;h=e6812a869aa79b70b24be47440c2263ae483797c;p=lhc%2Fweb%2Fwiklou.git * (bug 35446) Using "{{nse:}}" with an invalid namespace name no longer throws a PHP warning Change-Id: I8e7611cdb03558af13ec5b96e02857ff5b16b571 --- diff --git a/HISTORY b/HISTORY index 14a80d05ff..e138ec05cb 100644 --- a/HISTORY +++ b/HISTORY @@ -1,6 +1,10 @@ Change notes from older releases. For current info see RELEASE-NOTES-1.20. == MediaWiki 1.18 == +=== Changes since 1.18.2 === +* (bug 35446) Using "{{nse:}}" with an invalid namespace name no longer throws + a PHP warning. + === Changes since 1.18.1 === * (bug 33686) could not get a list of contributor for an article when using diff --git a/includes/parser/CoreParserFunctions.php b/includes/parser/CoreParserFunctions.php index 0abfcef849..7614bf500b 100644 --- a/includes/parser/CoreParserFunctions.php +++ b/includes/parser/CoreParserFunctions.php @@ -141,7 +141,11 @@ class CoreParserFunctions { } static function nse( $parser, $part1 = '' ) { - return wfUrlencode( str_replace( ' ', '_', self::ns( $parser, $part1 ) ) ); + $ret = self::ns( $parser, $part1 ); + if ( is_string( $ret ) ) { + $ret = wfUrlencode( str_replace( ' ', '_', $ret ) ); + } + return $ret; } /**