From: Wil Mahan Date: Sun, 19 Sep 2004 08:53:12 +0000 (+0000) Subject: Fix "Call to a member function on a non-object in /home/wikipedia/htdocs/test/w/inclu... X-Git-Tag: 1.5.0alpha1~1959 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=474968e5ea7e83eeb75a5b8011b55f821cd1454e;p=lhc%2Fweb%2Fwiklou.git Fix "Call to a member function on a non-object in /home/wikipedia/htdocs/test/w/includes/Title.php on line 189" error when a redirect contains '{' or '}' --- diff --git a/includes/Title.php b/includes/Title.php index 40d2de7d9b..b84f149bb7 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -186,7 +186,7 @@ class Title { $rt = Title::newFromText( $m[1] ); # Disallow redirects to Special:Userlogout - if ( $rt->getNamespace() == NS_SPECIAL && preg_match( '/^Userlogout/i', $rt->getText() ) ) { + if ( !is_null($rt) && $rt->getNamespace() == NS_SPECIAL && preg_match( '/^Userlogout/i', $rt->getText() ) ) { $rt = NULL; } }