r5299 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r5298‎ | r5299 | r5300 >
Date:08:53, 19 September 2004
Author:wmahan
Status:old
Tags:
Comment:
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 '}'
Modified paths:
  • /trunk/phase3/includes/Title.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Title.php
@@ -186,7 +186,7 @@
187187
188188 $rt = Title::newFromText( $m[1] );
189189 # Disallow redirects to Special:Userlogout
190 - if ( $rt->getNamespace() == NS_SPECIAL && preg_match( '/^Userlogout/i', $rt->getText() ) ) {
 190+ if ( !is_null($rt) && $rt->getNamespace() == NS_SPECIAL && preg_match( '/^Userlogout/i', $rt->getText() ) ) {
191191 $rt = NULL;
192192 }
193193 }

Status & tagging log