diff options
author | tgrant <tom.grant760@gmail.com> | 2020-09-27 12:50:08 +0100 |
---|---|---|
committer | tgrant <tom.grant760@gmail.com> | 2021-03-17 23:04:15 +0000 |
commit | f1710b57bc62a2ce99e5b0534ad6b9e4497cd25c (patch) | |
tree | d1b7ac1af113bf5a928ce63e7d52860742ccec92 /lib/private | |
parent | 37feee4e873b74413785ccb19f070dc33b66c338 (diff) | |
download | nextcloud-server-f1710b57bc62a2ce99e5b0534ad6b9e4497cd25c.tar.gz nextcloud-server-f1710b57bc62a2ce99e5b0534ad6b9e4497cd25c.zip |
Fix null displayname crash as described in #21885
Signed-off-by: tgrant <tom.grant760@gmail.com>
Diffstat (limited to 'lib/private')
-rw-r--r-- | lib/private/Group/Database.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/private/Group/Database.php b/lib/private/Group/Database.php index 29fcb503b10..cc8ea2fb52b 100644 --- a/lib/private/Group/Database.php +++ b/lib/private/Group/Database.php @@ -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(); |