Skip to content

Commit

Permalink
Fix getMetadata error
Browse files Browse the repository at this point in the history
 League\Flysystem\FileAttributes::__construct(): Argument #4 ($lastModified) must be of type ?int, string given
  • Loading branch information
sy-records committed Nov 10, 2021
1 parent 1680404 commit fe33c1a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/CosAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,9 @@ public function getMetadata($path): ?FileAttributes

return new FileAttributes(
$path,
$meta['Content-Length'][0] ?? null,
isset($meta['Content-Length'][0]) ? \strtotime($meta['Content-Length'][0]) : null,
null,
$meta['Last-Modified'][0] ?? null,
isset($meta['Last-Modified'][0]) ? \strtotime($meta['Last-Modified'][0]) : null,
$meta['Content-Type'][0] ?? null,
);
}
Expand Down

0 comments on commit fe33c1a

Please sign in to comment.