summaryrefslogtreecommitdiff
path: root/includes/parser/CoreParserFunctions.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/parser/CoreParserFunctions.php')
-rw-r--r--includes/parser/CoreParserFunctions.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/includes/parser/CoreParserFunctions.php b/includes/parser/CoreParserFunctions.php
index 080da602..5dffd978 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;
}
/**