X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Ffilerepo%2FForeignAPIRepo.php;h=ca417187e0ca72d8963599bb0b096508a8212a42;hb=d67197fa116acc366419faedeeacd91158a98f8b;hp=645a59bc161e4c62ea9afdc1fefb4db21535bb5c;hpb=381cffb9808faf14f37ede438fafe3c2bb92d7f2;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/filerepo/ForeignAPIRepo.php b/includes/filerepo/ForeignAPIRepo.php index 645a59bc16..ca417187e0 100644 --- a/includes/filerepo/ForeignAPIRepo.php +++ b/includes/filerepo/ForeignAPIRepo.php @@ -109,7 +109,7 @@ class ForeignAPIRepo extends FileRepo { * * @param Title $title * @param string|bool $time - * @return File + * @return File|false */ function newFile( $title, $time = false ) { if ( $time ) { @@ -532,8 +532,8 @@ class ForeignAPIRepo extends FileRepo { $status = $req->execute(); if ( $status->isOK() ) { - $mtime = wfTimestampOrNull( TS_UNIX, $req->getResponseHeader( 'Last-Modified' ) ); - $mtime = $mtime ?: false; + $lmod = $req->getResponseHeader( 'Last-Modified' ); + $mtime = $lmod ? wfTimestamp( TS_UNIX, $lmod ) : false; return $req->getContent(); } else {