From: Christoph M. Becker Date: Mon, 11 Nov 2019 17:08:00 +0000 (+0100) Subject: Make test more resilient X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=735c4cab7490ccb0ed70d50a84e6524a5244aa77;p=php Make test more resilient `socket_bind()` may raise `E_WARNING` on failure, which would cause the test to fail. --- diff --git a/ext/sockets/tests/socket_import_stream-3.phpt b/ext/sockets/tests/socket_import_stream-3.phpt index f83e8a487b..61eccfc537 100644 --- a/ext/sockets/tests/socket_import_stream-3.phpt +++ b/ext/sockets/tests/socket_import_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', 58379); +$br = @socket_bind($s, '0.0.0.0', 58379); if ($br === false) die("SKIP IPv4/port 58379 not available"); $so = @socket_set_option($s, IPPROTO_IP, MCAST_JOIN_GROUP, array(