Skip to content

Commit d7b2ee9

Browse files
committed
Address OSX-specific PHP bug 74556
1 parent 24ac7dd commit d7b2ee9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/Connection.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,9 @@ private function parseAddress($address)
156156
$address = (string)substr($address, 0, -1);
157157
}
158158

159-
// work around unknown addresses should return null value: https://3v4l.org/5C1lo
159+
// work around unknown addresses should return null value: https://3v4l.org/5C1lo and https://bugs.php.net/bug.php?id=74556
160160
// PHP uses "\0" string and HHVM uses empty string (colon removed above)
161-
if ($address === "\x00" || $address === '') {
161+
if ($address === '' || $address[0] === "\x00" ) {
162162
return null;
163163
}
164164

0 commit comments

Comments
 (0)