From 6a7e96c212e204a31147d5eb7905b43f3826d25c Mon Sep 17 00:00:00 2001 From: Pablo Zmdl <57864086+pabzm@users.noreply.github.com> Date: Sun, 29 Sep 2024 11:18:32 +0200 Subject: [PATCH] Fix getting IMAP vendor name (#9654) In some cases, the array's keys where upper case, and the previous code produced a warning and resulted in an empty string, even though the name was present. --- program/lib/Roundcube/rcube_imap.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/program/lib/Roundcube/rcube_imap.php b/program/lib/Roundcube/rcube_imap.php index acd60e72d7..eb69615c5d 100644 --- a/program/lib/Roundcube/rcube_imap.php +++ b/program/lib/Roundcube/rcube_imap.php @@ -655,7 +655,7 @@ public function get_vendor() $ident = null; } - $vendor = (string) (!empty($ident) ? $ident['name'] : ''); + $vendor = (string) ($ident['name'] ?? $ident['NAME'] ?? ''); $ident = strtolower($vendor . ' ' . $this->conn->data['GREETING']); $vendors = ['cyrus', 'dovecot', 'uw-imap', 'gimap', 'hmail', 'greenmail'];