r111447 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r111446‎ | r111447 | r111448 >
Date:05:13, 14 February 2012
Author:yaron
Status:deferred
Tags:
Comment:
Added handling in case prefix isn't parseable
Modified paths:
  • /trunk/extensions/ReplaceText/SpecialReplaceText.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ReplaceText/SpecialReplaceText.php
@@ -572,7 +572,10 @@
573573 }
574574
575575 $dbr = wfGetDB( DB_SLAVE );
576 - $prefix = Title::newFromText( $prefix )->getDbKey();
 576+ $title = Title::newFromText( $prefix );
 577+ if ( !is_null( $title ) ) {
 578+ $prefix = $title->getDbKey();
 579+ }
577580 $any = $dbr->anyString();
578581 $conds[] = 'page_title ' . $dbr->buildLike( $prefix, $any );
579582 }

Status & tagging log