From: Brion Vibber Date: Tue, 24 Mar 2009 23:04:51 +0000 (+0000) Subject: Fix up r48728 "Allow User: prefix in parameter to GENDER parser function" X-Git-Tag: 1.31.0-rc.0~42384 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22articles%22%2C%22id_article=%24ze_article%22%29%20.%20%22?a=commitdiff_plain;h=1a58e8f93e6fa2a99ed86cc9d66dc71bf08b7b73;p=lhc%2Fweb%2Fwiklou.git 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. --- 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