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 74a194f commit 5eb1c2dCopy full SHA for 5eb1c2d
src/Connection.php
@@ -146,11 +146,17 @@ private function parseAddress($address)
146
}
147
148
if ($this->unix) {
149
- // unknown addresses should not return a NULL-byte string
150
- if ($address === "\x00") {
+ // work around unknown addresses should return null value: https://3v4l.org/5C1lo
+ // PHP uses "\0" string and HHVM < 3.19 uses ":" string
151
+ if ($address === "\x00" || $address === ':') {
152
return null;
153
154
155
+ // remove trailing colon from address for HHVM < 3.19
156
+ if (substr($address, -1) === ':') {
157
+ $address = (string)substr($address, 0, -1);
158
+ }
159
+
160
return 'unix://' . $address;
161
162
0 commit comments