From 424d34d1c0390d51e6b5eb0978644554453c6b16 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Thu, 21 Nov 2019 13:40:36 +0100 Subject: [PATCH] Make test more resilient `socket_bind()` may raise `E_WARNING` on failure, which would cause the test to be marked as borked. Since we're checking the return value anyway, we can silence warnings. --- ext/sockets/tests/socket_export_stream-3.phpt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/sockets/tests/socket_export_stream-3.phpt b/ext/sockets/tests/socket_export_stream-3.phpt index 69b0ebe47d..b59c7700da 100644 --- a/ext/sockets/tests/socket_export_stream-3.phpt +++ b/ext/sockets/tests/socket_export_stream-3.phpt @@ -6,7 +6,7 @@ if (!extension_loaded('sockets')) { die('SKIP sockets extension not available.'); } $s = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP); -$br = socket_bind($s, '0.0.0.0', 58393); +$br = @socket_bind($s, '0.0.0.0', 58393); if ($br === false) die("SKIP IPv4/port 58393 not available"); $so = @socket_set_option($s, IPPROTO_IP, MCAST_JOIN_GROUP, array( -- 2.50.1