Skip to content

Commit 424d34d

Browse files
committed
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.
1 parent b40799e commit 424d34d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/sockets/tests/socket_export_stream-3.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ if (!extension_loaded('sockets')) {
66
die('SKIP sockets extension not available.');
77
}
88
$s = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
9-
$br = socket_bind($s, '0.0.0.0', 58393);
9+
$br = @socket_bind($s, '0.0.0.0', 58393);
1010
if ($br === false)
1111
die("SKIP IPv4/port 58393 not available");
1212
$so = @socket_set_option($s, IPPROTO_IP, MCAST_JOIN_GROUP, array(

0 commit comments

Comments
 (0)