diff --git a/modules/imap/functions.php b/modules/imap/functions.php index d3102c35e..7badc0293 100644 --- a/modules/imap/functions.php +++ b/modules/imap/functions.php @@ -1526,9 +1526,10 @@ function forward_dropdown($output,$reply_args) { if (!hm_exists('parse_sieve_config_host')) { function parse_sieve_config_host($host) { $url = parse_url($host); - if(!isset($url['host'])) { - $host = $url['path']; + if ($url === false) { + return $host; } + $host = $url['host'] ?? $url['path']; $port = $url['port'] ?? '4190'; return [$host, $port]; }}