Browse Source

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.
backport-virtuser_file-email2user-fix
Pablo Zmdl 10 months ago
committed by Aleksander Machniak
parent
commit
8cc559a6f0
  1. 4
      program/lib/Roundcube/rcube_imap.php

4
program/lib/Roundcube/rcube_imap.php

@ -658,8 +658,8 @@ class rcube_imap extends rcube_storage
$ident = null;
}
$vendor = (string) (!empty($ident) ? $ident['name'] : '');
$ident = strtolower($vendor . ' ' . $this->conn->data['GREETING']);
$vendor = (string) ($ident['name'] ?? $ident['NAME'] ?? '');
$ident = strtolower($vendor . ' ' . $this->conn->data['GREETING']);
$vendors = ['cyrus', 'dovecot', 'uw-imap', 'gimap', 'hmail', 'greenmail'];
foreach ($vendors as $v) {

Loading…
Cancel
Save