Skip to content

Commit

Permalink
Merge pull request #121 from erikn69/patch-2
Browse files Browse the repository at this point in the history
Fix count(): Argument #1 ($value) must be of type Countable|array on PHP 8.3
  • Loading branch information
masbug authored Feb 25, 2024
2 parents 31300ed + 177e9b9 commit a1ea9ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/GoogleDriveAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -1000,7 +1000,7 @@ protected function getRawVisibility($path)
$permissions = $file->getPermissions();
$visibility = AdapterInterface::VISIBILITY_PRIVATE;

if (! count($permissions)) {
if (! count($permissions ?: [])) {
$permissions = $this->service->permissions->listPermissions($file->getId(), $this->applyDefaultParams([], 'permissions.list'));
$file->setPermissions($permissions);
}
Expand Down

0 comments on commit a1ea9ba

Please sign in to comment.