Skip to content

Commit e621ea2

Browse files
authored
Merge pull request #123 from andig/php74556
Fix Unix domain socket (UDS) paths for Mac OS X
2 parents 24ac7dd + d7b2ee9 commit e621ea2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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)
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