$this->dieWithError( [ 'apierror-bad-badfilecontexttitle', $p ], 'invalid-title' );
}
} else {
- $badFileContextTitle = false;
+ $badFileContextTitle = null;
}
$pageIds = $this->getPageSet()->getGoodAndMissingTitlesByNamespace();
$info['imagerepository'] = $img->getRepoName();
}
if ( isset( $prop['badfile'] ) ) {
- $info['badfile'] = (bool)wfIsBadImage( $title, $badFileContextTitle );
+ $info['badfile'] = (bool)MediaWikiServices::getInstance()->getBadFileLookup()
+ ->isBadFile( $title, $badFileContextTitle );
}
$fit = $result->addValue( [ 'query', 'pages' ], (int)$pageId, $info );