Skip to content

Commit 8cc559a

Browse files
pabzmalecpl
authored andcommitted
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.
1 parent 84e0baf commit 8cc559a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

program/lib/Roundcube/rcube_imap.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -658,8 +658,8 @@ public function get_vendor()
658658
$ident = null;
659659
}
660660

661-
$vendor = (string) (!empty($ident) ? $ident['name'] : '');
662-
$ident = strtolower($vendor . ' ' . $this->conn->data['GREETING']);
661+
$vendor = (string) ($ident['name'] ?? $ident['NAME'] ?? '');
662+
$ident = strtolower($vendor . ' ' . $this->conn->data['GREETING']);
663663
$vendors = ['cyrus', 'dovecot', 'uw-imap', 'gimap', 'hmail', 'greenmail'];
664664

665665
foreach ($vendors as $v) {

0 commit comments

Comments
 (0)