]> granicus.if.org Git - php/commitdiff
Fix potentially borked test case
authorChristoph M. Becker <cmbecker69@gmx.de>
Sat, 12 Oct 2019 14:48:08 +0000 (16:48 +0200)
committerChristoph M. Becker <cmbecker69@gmx.de>
Sat, 12 Oct 2019 14:48:45 +0000 (16:48 +0200)
If interface 'lo' is not available, `socket_set_option()` may warn,
which would cause the test to be marked as borked.  Thus we silence the
function call.

ext/sockets/tests/mcast_ipv4_recv.phpt

index f56b21a2fab15e8ed8641c5e5c995623718a89f2..aef566e9157017a7d96aaf110908d3cf1296ddf7 100644 (file)
@@ -8,7 +8,7 @@ if (!extension_loaded('sockets')) {
 if (getenv('SKIP_ONLINE_TESTS')) die('skip online test');
 $s = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
 $br = socket_bind($s, '0.0.0.0', 3000);
-$so = socket_set_option($s, IPPROTO_IP, MCAST_JOIN_GROUP, array(
+$so = @socket_set_option($s, IPPROTO_IP, MCAST_JOIN_GROUP, array(
        "group" => '224.0.0.23',
        "interface" => 'lo',
 ));