Skip to content

Commit

Permalink
Merge pull request #29 from ranpro/hotfix/boolean
Browse files Browse the repository at this point in the history
  • Loading branch information
overtrue authored Feb 20, 2023
2 parents cb3efbe + 9a9d2c4 commit cd4eee4
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 @@ -214,7 +214,7 @@ public function visibility(string $path): FileAttributes
public function mimeType(string $path): FileAttributes
{
$meta = $this->getMetadata($path);
if ($meta->mimeType() === null) {
if (!$meta || $meta->mimeType() === null) {
throw UnableToRetrieveMetadata::mimeType($path);
}
return $meta;
Expand All @@ -229,7 +229,7 @@ public function lastModified(string $path): FileAttributes
{
$meta = $this->getMetadata($path);

if ($meta->lastModified() === null) {
if (!$meta || $meta->lastModified() === null) {
throw UnableToRetrieveMetadata::lastModified($path);
}

Expand Down

0 comments on commit cd4eee4

Please sign in to comment.