Thread:Extension talk:UserFunctions/Call to a member function getNamespace() on a non-object in UserFunctions.php:69/reply

Here's a patch which fixes the bug.

--- a/mediawiki/extensions/UserFunctions/UserFunctions.php +++ b/mediawiki/extensions/UserFunctions/UserFunctions.php @@ -66,7 +66,8 @@ function wfRegisterUserFunctions( $parser ) { $special = false; // Initialize NS -      $cur_ns = RequestContext::getMain->getTitle->getNamespace; +      $title = RequestContext::getMain->getTitle; +      $cur_ns = $title === null ? -1 : $title->getNamespace; if ( $cur_ns == -1 ) { $special = true; }