Skip to content

Commit

Permalink
Merge pull request #28 from ranpro/patch-1
Browse files Browse the repository at this point in the history
fix: call function on bool value
  • Loading branch information
overtrue authored Oct 28, 2022
2 parents 3a4e98d + eca82f8 commit cb3efbe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/CosAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ public function fileSize(string $path): FileAttributes
{
$meta = $this->getMetadata($path);

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

Expand Down

0 comments on commit cb3efbe

Please sign in to comment.