Skip to content
This repository has been archived by the owner on Jan 18, 2023. It is now read-only.

Commit

Permalink
Fix null displayname crash as described in nextcloud#21885
Browse files Browse the repository at this point in the history
Signed-off-by: tgrant <tom.grant760@gmail.com>
  • Loading branch information
TomG736 committed Sep 27, 2020
1 parent 190f0be commit a222e3a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/private/Group/Database.php
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,11 @@ public function countDisabledInGroup(string $gid): int {

public function getDisplayName(string $gid): string {
if (isset($this->groupCache[$gid])) {
return $this->groupCache[$gid]['displayname'];
$displayName = $this->groupCache[$gid]['displayname'];

if (isset($displayName) && trim($displayName) !== '') {
return $displayName;
}
}

$this->fixDI();
Expand Down

0 comments on commit a222e3a

Please sign in to comment.