X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Flibs%2Ffilebackend%2Ffsfile%2FFSFile.php;h=cce32bacccd430294e3f091a16c27fa34cb966bd;hb=5a451fd01be397db3209c1881a335423706da5c2;hp=1937e374414da4858c0637b68db0f485f497a35d;hpb=4a8fd65caa0d3919d1917920a9d11f8d9355574d;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/libs/filebackend/fsfile/FSFile.php b/includes/libs/filebackend/fsfile/FSFile.php index 1937e37441..cce32baccc 100644 --- a/includes/libs/filebackend/fsfile/FSFile.php +++ b/includes/libs/filebackend/fsfile/FSFile.php @@ -22,6 +22,7 @@ */ use Wikimedia\AtEase\AtEase; +use Wikimedia\Timestamp\ConvertibleTimestamp; /** * Class representing a non-directory file on the file system @@ -68,7 +69,11 @@ class FSFile { * @return int|bool */ public function getSize() { - return filesize( $this->path ); + AtEase::suppressWarnings(); + $size = filesize( $this->path ); + AtEase::restoreWarnings(); + + return $size; } /** @@ -81,7 +86,7 @@ class FSFile { $timestamp = filemtime( $this->path ); AtEase::restoreWarnings(); if ( $timestamp !== false ) { - $timestamp = wfTimestamp( TS_MW, $timestamp ); + $timestamp = ConvertibleTimestamp::convert( TS_MW, $timestamp ); } return $timestamp;