diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2015-10-18 09:31:31 +0200 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2015-10-18 09:31:31 +0200 |
commit | 80f7dc77d430774192b929d780f96260066df2ee (patch) | |
tree | 102eaae7fc9ec567f2af76e96da3de2d1e83afcf /includes/filerepo/FileRepo.php | |
parent | cccd7bb4d819334c07e0dadaf16cbfdef31880e1 (diff) |
Update to MediaWiki 1.25.3
Diffstat (limited to 'includes/filerepo/FileRepo.php')
-rw-r--r-- | includes/filerepo/FileRepo.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/includes/filerepo/FileRepo.php b/includes/filerepo/FileRepo.php index 5b42c2c6..cef1176d 100644 --- a/includes/filerepo/FileRepo.php +++ b/includes/filerepo/FileRepo.php @@ -431,7 +431,9 @@ class FileRepo { # Now try an old version of the file if ( $time !== false ) { $img = $this->newFile( $title, $time ); - $img->load( $flags ); + if ( $img ) { + $img->load( $flags ); + } if ( $img && $img->exists() ) { if ( !$img->isDeleted( File::DELETED_FILE ) ) { return $img; // always OK @@ -452,10 +454,10 @@ class FileRepo { $redir = $this->checkRedirect( $title ); if ( $redir && $title->getNamespace() == NS_FILE ) { $img = $this->newFile( $redir ); - $img->load( $flags ); if ( !$img ) { return false; } + $img->load( $flags ); if ( $img->exists() ) { $img->redirectedFrom( $title->getDBkey() ); |