We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2e81893 commit 77ace61Copy full SHA for 77ace61
1 file changed
src/Socket.php
@@ -104,10 +104,10 @@ private function sanitizeAddress($address)
104
{
105
// doc comment suggests IPv6 address is not enclosed in square brackets?
106
107
- $pos = strrpos(':', $address);
+ $pos = strrpos($address, ':');
108
// this is an IPv6 address which includes colons but no square brackets
109
if ($pos !== false && substr($address, 0, 1) !== '[') {
110
- if (strpos(':', $address) < $pos) {
+ if (strpos($address, ':') < $pos) {
111
$port = substr($address, $pos + 1);
112
$address = '[' . substr($address, 0, $pos) . ']:' . $port;
113
}
0 commit comments