Skip to content

Commit 4857af7

Browse files
stayalliveGrahamCampbell
authored andcommitted
Guard against empty list of clusters
1 parent 0bbd281 commit 4857af7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Api/Database.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function getAllClusters(?string $tag = null)
4141

4242
return \array_map(function ($cluster) {
4343
return new DatabaseClusterEntity($cluster);
44-
}, $clusters->databases);
44+
}, $clusters->databases ?? []);
4545
}
4646

4747
/**

0 commit comments

Comments
 (0)