From: Christoph M. Becker Date: Thu, 21 Nov 2019 12:40:36 +0000 (+0100) Subject: Make test more resilient X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=424d34d1c0390d51e6b5eb0978644554453c6b16;p=php 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. --- 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(