Skip to content

Commit 77ace61

Browse files
committed
Swapped needle and haystack arguments
1 parent 2e81893 commit 77ace61

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/Socket.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,10 @@ private function sanitizeAddress($address)
104104
{
105105
// doc comment suggests IPv6 address is not enclosed in square brackets?
106106
107-
$pos = strrpos(':', $address);
107+
$pos = strrpos($address, ':');
108108
// this is an IPv6 address which includes colons but no square brackets
109109
if ($pos !== false && substr($address, 0, 1) !== '[') {
110-
if (strpos(':', $address) < $pos) {
110+
if (strpos($address, ':') < $pos) {
111111
$port = substr($address, $pos + 1);
112112
$address = '[' . substr($address, 0, $pos) . ']:' . $port;
113113
}

0 commit comments

Comments
 (0)