diff --git a/src/CosAdapter.php b/src/CosAdapter.php index 1d1273c..63b99a0 100644 --- a/src/CosAdapter.php +++ b/src/CosAdapter.php @@ -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, ); }