Skip to content

Commit 6e43a55

Browse files
authored
Merge pull request #94 from clue-labs/compat
Work around latest PHP 7.0.18 and 7.1.4 no longer accepting full URIs
2 parents 57e3262 + 375688c commit 6e43a55

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/TcpConnector.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,12 @@ public function connect($uri)
6666
}
6767
}
6868

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

7573
$socket = @stream_socket_client(
76-
$uri,
74+
$remote,
7775
$errno,
7876
$errstr,
7977
0,

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy