From 474968e5ea7e83eeb75a5b8011b55f821cd1454e Mon Sep 17 00:00:00 2001 From: Wil Mahan Date: Sun, 19 Sep 2004 08:53:12 +0000 Subject: [PATCH] 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 '}' --- includes/Title.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } } -- 2.20.1