diff options
author | tgrant <tom.grant760@gmail.com> | 2020-09-27 12:50:08 +0100 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2021-09-10 10:47:32 +0000 |
commit | b60b800bb18803fd0e2d36a06f45c04ddf9fa7d8 (patch) | |
tree | 1de9526feb31bcfd9b1857ad4d20ddeb0ff0fef4 /lib | |
parent | 2d1e0ae8f7389baf8b1f8a14c6b6266e959aad51 (diff) | |
download | nextcloud-server-b60b800bb18803fd0e2d36a06f45c04ddf9fa7d8.tar.gz nextcloud-server-b60b800bb18803fd0e2d36a06f45c04ddf9fa7d8.zip |
Fix null displayname crash as described in #21885
Signed-off-by: tgrant <tom.grant760@gmail.com>
Diffstat (limited to 'lib')
-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 c49f3bce596..6fe67204a8f 100644 --- a/lib/private/Group/Database.php +++ b/lib/private/Group/Database.php @@ -456,7 +456,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(); |