Skip to content

Commit f6bd5dc

Browse files
committed
Fix test case
`MSG_EOR` and `MSG_EOF` are not necessarily defined, in which case the test would fail.
1 parent c10d3d3 commit f6bd5dc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/sockets/tests/socket_send.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ if(socket_send($socket, $stringSocket, $stringSocketLength, MSG_OOB)===$stringSo
2323
print("okey\n");
2424
}
2525

26-
if(socket_send($socket, $stringSocket, $stringSocketLength, MSG_EOR)===$stringSocketLength){
26+
if(!defined('MSG_EOR') || socket_send($socket, $stringSocket, $stringSocketLength, MSG_EOR)===$stringSocketLength){
2727
print("okey\n");
2828
}
2929

30-
if(socket_send($socket, $stringSocket, $stringSocketLength, MSG_EOF)===$stringSocketLength){
30+
if(!defined('MSG_EOF') || socket_send($socket, $stringSocket, $stringSocketLength, MSG_EOF)===$stringSocketLength){
3131
print("okey\n");
3232
}
3333

0 commit comments

Comments
 (0)