Skip to content

Commit e13d106

Browse files
committed
fixes
1 parent 476d01e commit e13d106

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

ext/sockets/tests/socket_set_option_acf.phpt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,16 @@ if (!$socket) {
2121
}
2222
try {
2323
var_dump(socket_set_option( $socket, SOL_SOCKET, SO_ACCEPTFILTER, 1));
24-
} catch (\ValueError $e) {
25-
echo $e->getMessage() . \PHP_EOL;
24+
} catch (\Throwable $e) {
25+
echo $e::class, ': ', $e->getMessage(), \PHP_EOL;
2626
}
2727
socket_listen($socket);
2828
var_dump(socket_set_option( $socket, SOL_SOCKET, SO_ACCEPTFILTER, "httpready"));
2929
var_dump(socket_get_option( $socket, SOL_SOCKET, SO_ACCEPTFILTER));
3030
socket_close($socket);
3131
?>
32-
--EXPECTF--
33-
Warning: socket_set_option(): Invalid filter argument type in %s on line %d
34-
bool(false)
32+
--EXPECT--
33+
TypeError: socket_set_option(): Argument #4 ($value) must be of type string when argument #3 ($option) is SO_ACCEPTFILTER, int given
3534
bool(true)
3635
array(1) {
3736
["af_name"]=>

ext/sockets/tests/socket_set_option_invalid_value_for_IPPROTO_TCP_TCP_FUNCTION_BLK.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ try {
3333
echo $e::class, ': ', $e->getMessage(), PHP_EOL;
3434
}
3535
try {
36-
$ret = socket_set_option($socket, IPPROTO_TCP, TCP_FUNCTION_BLK, str_repeat("a", 2048);
36+
$ret = socket_set_option($socket, IPPROTO_TCP, TCP_FUNCTION_BLK, str_repeat("a", 2048));
3737
var_dump($ret);
3838
} catch (Throwable $e) {
3939
echo $e::class, ': ', $e->getMessage(), PHP_EOL;

ext/sockets/tests/socket_set_option_invalid_value_for_SOL_SOCKET_SO_ACCEPTFILTER.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ try {
3333
echo $e::class, ': ', $e->getMessage(), PHP_EOL;
3434
}
3535
try {
36-
$ret = socket_set_option($socket, SOL_SOCKET, SO_ACCEPTFILTER, str_repeat("a", 2048);
36+
$ret = socket_set_option($socket, SOL_SOCKET, SO_ACCEPTFILTER, str_repeat("a", 2048));
3737
var_dump($ret);
3838
} catch (Throwable $e) {
3939
echo $e::class, ': ', $e->getMessage(), PHP_EOL;

0 commit comments

Comments
 (0)