From 1a58e8f93e6fa2a99ed86cc9d66dc71bf08b7b73 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Tue, 24 Mar 2009 23:04:51 +0000 Subject: [PATCH] Fix up r48728 "Allow User: prefix in parameter to GENDER parser function" Wasn't checking return value for null, or actually calling the getNamespace() method correctly. --- includes/parser/CoreParserFunctions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/parser/CoreParserFunctions.php b/includes/parser/CoreParserFunctions.php index 495be851f7..9d656d2ec1 100644 --- a/includes/parser/CoreParserFunctions.php +++ b/includes/parser/CoreParserFunctions.php @@ -201,7 +201,7 @@ class CoreParserFunctions { // allow prefix. $title = Title::newFromText( $user ); - if ($title->getNamespace == NS_USER) + if (is_object( $title ) && $title->getNamespace() == NS_USER) $user = $title->getText(); // check parameter, or use $wgUser if in interface message -- 2.20.1