Fix null displayname crash as described in #21885

Signed-off-by: tgrant <tom.grant760@gmail.com>
This commit is contained in:
tgrant 2020-09-27 12:50:08 +01:00
parent 37feee4e87
commit f1710b57bc
1 changed files with 5 additions and 1 deletions

View File

@ -458,7 +458,11 @@ class Database extends ABackend implements
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();