]> granicus.if.org Git - php/commitdiff
Fix test case
authorChristoph M. Becker <cmbecker69@gmx.de>
Sat, 12 Oct 2019 14:27:24 +0000 (16:27 +0200)
committerChristoph M. Becker <cmbecker69@gmx.de>
Sat, 12 Oct 2019 14:28:57 +0000 (16:28 +0200)
`MSG_EOR` and `MSG_EOF` are not necessarily defined, in which case the
test would fail.

ext/sockets/tests/socket_send.phpt

index dd6be6898b8af0c054c61e92f0f362421fbdc8c1..71ba5b028f8d31617c52f8fdca25d61e09e35c7f 100644 (file)
@@ -23,11 +23,11 @@ if(socket_send($socket, $stringSocket, $stringSocketLength, MSG_OOB)===$stringSo
   print("okey\n");
 }
 
-if(socket_send($socket, $stringSocket, $stringSocketLength, MSG_EOR)===$stringSocketLength){
+if(!defined('MSG_EOR') || socket_send($socket, $stringSocket, $stringSocketLength, MSG_EOR)===$stringSocketLength){
   print("okey\n");
 }
 
-if(socket_send($socket, $stringSocket, $stringSocketLength, MSG_EOF)===$stringSocketLength){
+if(!defined('MSG_EOF') || socket_send($socket, $stringSocket, $stringSocketLength, MSG_EOF)===$stringSocketLength){
   print("okey\n");
 }