mirror of
https://github.com/roundcube/roundcubemail.git
synced 2026-02-20 01:21:20 +01:00
Fix PHP error when imap_conn_options.proxy_protocol is not an array
This commit is contained in:
@@ -323,11 +323,11 @@ $config['smtp_timeout'] = 0;
|
||||
// The example below enables server certificate validation, and
|
||||
// requires 'smtp_timeout' to be non zero.
|
||||
// $config['smtp_conn_options'] = [
|
||||
// 'ssl' => [
|
||||
// 'verify_peer' => true,
|
||||
// 'verify_depth' => 3,
|
||||
// 'cafile' => '/etc/openssl/certs/ca.crt',
|
||||
// ],
|
||||
// 'ssl' => [
|
||||
// 'verify_peer' => true,
|
||||
// 'verify_depth' => 3,
|
||||
// 'cafile' => '/etc/openssl/certs/ca.crt',
|
||||
// ],
|
||||
// ];
|
||||
// Note: These can be also specified as an array of options indexed by hostname
|
||||
$config['smtp_conn_options'] = null;
|
||||
|
||||
@@ -1054,7 +1054,8 @@ class rcube_imap_generic
|
||||
}
|
||||
|
||||
if (!empty($this->prefs['socket_options'])) {
|
||||
$context = stream_context_create($this->prefs['socket_options']);
|
||||
$options = array_intersect_key($this->prefs['socket_options'], ['ssl' => 1]);
|
||||
$context = stream_context_create($options);
|
||||
$this->fp = stream_socket_client($host . ':' . $port, $errno, $errstr,
|
||||
$this->prefs['timeout'], STREAM_CLIENT_CONNECT, $context);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user