Skip to content

Commit

Permalink
Don't set port for unix:// connection types
Browse files Browse the repository at this point in the history
Otherwise :143 was appended to the connection string
and it failed for unix sockets.

Thanks to Jan for implementing unix socket
support in the first place in Horde_Socket_Client.
  • Loading branch information
thomasjfox authored and mrubinsk committed Nov 24, 2016
1 parent 521b225 commit a77cfaf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion framework/Imap_Client/lib/Horde/Imap/Client/Base.php
Expand Up @@ -249,7 +249,7 @@ public function __construct(array $params = array())
'timeout' => 30
), array_filter($params));

if (!isset($params['port'])) {
if (!isset($params['port']) && strpos($params['hostspec'], 'unix://') !== 0) {
$params['port'] = (!empty($params['secure']) && in_array($params['secure'], array('ssl', 'sslv2', 'sslv3'), true))
? $this->_defaultPorts[1]
: $this->_defaultPorts[0];
Expand Down

0 comments on commit a77cfaf

Please sign in to comment.