diff options
Diffstat (limited to 'includes/PrefixSearch.php')
-rw-r--r-- | includes/PrefixSearch.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/includes/PrefixSearch.php b/includes/PrefixSearch.php index 55a4f49b..430b4b89 100644 --- a/includes/PrefixSearch.php +++ b/includes/PrefixSearch.php @@ -362,7 +362,11 @@ abstract class PrefixSearch { $ns = NS_MAIN; // if searching on many always default to main } - $t = Title::newFromText( $search, $ns ); + $t = null; + if ( is_string( $search ) ) { + $t = Title::newFromText( $search, $ns ); + } + $prefix = $t ? $t->getDBkey() : ''; $dbr = wfGetDB( DB_SLAVE ); $res = $dbr->select( 'page', |