X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FPrefixSearch.php;h=430b4b8972d5d7259059f2f1d5a08cea99a1f3f8;hb=11cf19d3ff0335706378b0b9f3d69091e4241f23;hp=55a4f49b34615768066c86ef0664c270b7b8ae53;hpb=53a43bb6516ceeecf7b6712169e6b2f8c4ce0fb9;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/PrefixSearch.php b/includes/PrefixSearch.php index 55a4f49b34..430b4b8972 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',