Skip to content

Commit

Permalink
Fix null displayname crash as described in #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 Mar 17, 2021
1 parent 37feee4 commit f1710b5
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 @@ -458,7 +458,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 f1710b5

Please sign in to comment.