aboutsummaryrefslogtreecommitdiffstats
path: root/includes/api/ApiQueryImageInfo.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/api/ApiQueryImageInfo.php')
-rw-r--r--includes/api/ApiQueryImageInfo.php3
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 {