Index: trunk/phase3/includes/filerepo/FileRepo.php |
— | — | @@ -224,7 +224,7 @@ |
225 | 225 | # Now try an old version of the file |
226 | 226 | if ( $time !== false ) { |
227 | 227 | $img = $this->newFileFromKey( $sha1, $time ); |
228 | | - if ( $img->exists() ) { |
| 228 | + if ( $img && $img->exists() ) { |
229 | 229 | if ( !$img->isDeleted(File::DELETED_FILE) ) { |
230 | 230 | return $img; |
231 | 231 | } else if ( !empty( $options['private'] ) && $img->userCan(File::DELETED_FILE) ) { |