Skip to content

Commit cc8739c

Browse files
committed
Fix potentially borked test case
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.
1 parent 52f0610 commit cc8739c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/sockets/tests/mcast_ipv4_recv.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ if (!extension_loaded('sockets')) {
88
if (getenv('SKIP_ONLINE_TESTS')) die('skip online test');
99
$s = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
1010
$br = socket_bind($s, '0.0.0.0', 3000);
11-
$so = socket_set_option($s, IPPROTO_IP, MCAST_JOIN_GROUP, array(
11+
$so = @socket_set_option($s, IPPROTO_IP, MCAST_JOIN_GROUP, array(
1212
"group" => '224.0.0.23',
1313
"interface" => 'lo',
1414
));

0 commit comments

Comments
 (0)