}
public function getCustomPrinter() {
- switch( $this->getFormat() ) {
+ switch ( $this->getFormat() ) {
case 'json':
return $this->getMain()->createPrinterByName( 'json' . $this->fm );
// Find matching titles as Title objects
$searcher = new TitlePrefixSearch;
$titles = $searcher->searchWithVariants( $search, $limit, $namespaces );
+ if ( !$titles ) {
+ return;
+ }
if ( $resolveRedir ) {
// Query for redirects