Skip to content

Commit 4cdf70d

Browse files
committed
Fix null
1 parent 18f0f9a commit 4cdf70d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Collections/RelatedUsersCollection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public function getMergedChilds(string $userId, array $except): array
116116

117117
public function getByUserId(string $userId): ?array
118118
{
119-
return array_values($this->relatedUsers[$userId]) ?? null;
119+
return empty($this->relatedUsers[$userId]) ? null : array_values($this->relatedUsers[$userId]);
120120
}
121121

122122
public function getAll(): array

0 commit comments

Comments
 (0)