*
* Example config:
*
- * $wgForeignFileRepos[] = array(
+ * $wgForeignFileRepos[] = [
* 'class' => 'ForeignAPIRepo',
* 'name' => 'shared',
* 'apibase' => 'https://en.wikipedia.org/w/api.php',
* 'fetchDescription' => true, // Optional
* 'descriptionCacheExpiry' => 3600,
- * );
+ * ];
*
* @ingroup 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 {