Skip to content

Commit

Permalink
fix: call function on bool value
Browse files Browse the repository at this point in the history
  • Loading branch information
ramzeng authored Oct 28, 2022
1 parent 3a4e98d commit eca82f8
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 eca82f8

Please sign in to comment.