diff options
Diffstat (limited to 'includes/api/ApiQueryImageInfo.php')
-rw-r--r-- | includes/api/ApiQueryImageInfo.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/includes/api/ApiQueryImageInfo.php b/includes/api/ApiQueryImageInfo.php index 051e12796f08..e123a2ac468c 100644 --- a/includes/api/ApiQueryImageInfo.php +++ b/includes/api/ApiQueryImageInfo.php @@ -110,7 +110,8 @@ class ApiQueryImageInfo extends ApiQueryBase { if ( !isset( $images[$title] ) ) { if ( isset( $prop['uploadwarning'] ) || isset( $prop['badfile'] ) ) { // uploadwarning and badfile need info about non-existing files - $images[$title] = wfLocalFile( $title ); + $images[$title] = MediaWikiServices::getInstance()->getRepoGroup() + ->getLocalRepo()->newFile( $title ); // Doesn't exist, so set an empty image repository $info['imagerepository'] = ''; } else { |