Skip to content

Commit 3d1c786

Browse files
authored
Merge pull request #23065 from TomG736/FixEmptyDisplayName
Fix null displayname crash as described in #21885
2 parents 1b21b17 + 23dbbca commit 3d1c786

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/private/Group/Database.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,11 @@ public function countDisabledInGroup(string $gid): int {
458458

459459
public function getDisplayName(string $gid): string {
460460
if (isset($this->groupCache[$gid])) {
461-
return $this->groupCache[$gid]['displayname'];
461+
$displayName = $this->groupCache[$gid]['displayname'];
462+
463+
if (isset($displayName) && trim($displayName) !== '') {
464+
return $displayName;
465+
}
462466
}
463467

464468
$this->fixDI();

0 commit comments

Comments
 (0)