Skip to content

Commit 712b341

Browse files
committed
Work around HHVM incompatibility
Zend's documentation suggests a negative return code in case of an error, while HHVM actually returns a boolean false
1 parent 4875c33 commit 712b341

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Datagram/Buffer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ protected function handleWrite($data, $remoteAddress)
110110
$ret = @stream_socket_sendto($this->socket, $data, 0, $remoteAddress);
111111
}
112112

113-
if ($ret < 0) {
113+
if ($ret < 0 || $ret === false) {
114114
$error = error_get_last();
115115
throw new Exception('Unable to send packet: ' . trim($error['message']));
116116
}

0 commit comments

Comments
 (0)