Skip to content

Commit

Permalink
Don't check display name on null
Browse files Browse the repository at this point in the history
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
  • Loading branch information
solracsf authored and backportbot-nextcloud[bot] committed Dec 4, 2023
1 parent 4da520b commit 013b344
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Album/AlbumMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -353,10 +353,10 @@ public function getCollaborators(int $albumId): array {

switch ($row['collaborator_type']) {
case self::TYPE_USER:
$displayName = $this->userManager->get($row['collaborator_id'])->getDisplayName();
$displayName = $this->userManager->get($row['collaborator_id'])?->getDisplayName();
break;
case self::TYPE_GROUP:
$displayName = $this->groupManager->get($row['collaborator_id'])->getDisplayName();
$displayName = $this->groupManager->get($row['collaborator_id'])?->getDisplayName();
break;
case self::TYPE_LINK:
$displayName = $this->l->t('Public link');
Expand Down

0 comments on commit 013b344

Please sign in to comment.