Index: trunk/extensions/ReplaceText/SpecialReplaceText.php |
— | — | @@ -572,7 +572,10 @@ |
573 | 573 | } |
574 | 574 | |
575 | 575 | $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 | + } |
577 | 580 | $any = $dbr->anyString(); |
578 | 581 | $conds[] = 'page_title ' . $dbr->buildLike( $prefix, $any ); |
579 | 582 | } |