Merge pull request #23065 from TomG736/FixEmptyDisplayName
Fix null displayname crash as described in #21885
This commit is contained in:
commit
3d1c78647e
|
@ -458,7 +458,11 @@ class Database extends ABackend implements
|
||||||
|
|
||||||
public function getDisplayName(string $gid): string {
|
public function getDisplayName(string $gid): string {
|
||||||
if (isset($this->groupCache[$gid])) {
|
if (isset($this->groupCache[$gid])) {
|
||||||
return $this->groupCache[$gid]['displayname'];
|
$displayName = $this->groupCache[$gid]['displayname'];
|
||||||
|
|
||||||
|
if (isset($displayName) && trim($displayName) !== '') {
|
||||||
|
return $displayName;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->fixDI();
|
$this->fixDI();
|
||||||
|
|
Loading…
Reference in New Issue