Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions src/TcpConnector.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,12 @@ public function connect($uri)
}
}

// HHVM fails to parse URIs with a query but no path, so let's add a dummy path
// See also https://3v4l.org/jEhLF
if (defined('HHVM_VERSION') && isset($parts['query']) && !isset($parts['path'])) {
$uri = str_replace('?', '/?', $uri); // @codeCoverageIgnore
}
// latest versions of PHP no longer accept any other URI components and
// HHVM fails to parse URIs with a query but no path, so let's simplify our URI here
$remote = 'tcp://' . $parts['host'] . ':' . $parts['port'];

$socket = @stream_socket_client(
$uri,
$remote,
$errno,
$errstr,
0,
Expand Down