mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
ext/sockets: drop convert_to_array for multicast leave group settings.
close GH-17371
This commit is contained in:
parent
5ba299be18
commit
9f87a19de4
4 changed files with 62 additions and 5 deletions
|
@ -159,8 +159,16 @@ mcast_req_fun: ;
|
|||
php_sockaddr_storage group = {0};
|
||||
socklen_t glen;
|
||||
|
||||
convert_to_array(arg4);
|
||||
opt_ht = Z_ARRVAL_P(arg4);
|
||||
if (Z_TYPE_P(arg4) != IS_ARRAY) {
|
||||
if (UNEXPECTED(Z_TYPE_P(arg4) != IS_OBJECT)) {
|
||||
zend_argument_type_error(4, "must be of type array when argument #3 ($option) is MCAST_LEAVE_GROUP, %s given", zend_zval_value_name(arg4));
|
||||
return FAILURE;
|
||||
} else {
|
||||
opt_ht = Z_OBJPROP_P(arg4);
|
||||
}
|
||||
} else {
|
||||
opt_ht = Z_ARRVAL_P(arg4);
|
||||
}
|
||||
|
||||
if (php_get_address_from_array(opt_ht, "group", php_sock, &group,
|
||||
&glen) == FAILURE) {
|
||||
|
@ -194,9 +202,16 @@ mcast_req_fun: ;
|
|||
source = {0};
|
||||
socklen_t glen,
|
||||
slen;
|
||||
|
||||
convert_to_array(arg4);
|
||||
opt_ht = Z_ARRVAL_P(arg4);
|
||||
if (Z_TYPE_P(arg4) != IS_ARRAY) {
|
||||
if (UNEXPECTED(Z_TYPE_P(arg4) != IS_OBJECT)) {
|
||||
zend_argument_type_error(4, "must be of type array when argument #3 ($option) is MCAST_LEAVE_SOURCE_GROUP, %s given", zend_zval_value_name(arg4));
|
||||
return FAILURE;
|
||||
} else {
|
||||
opt_ht = Z_OBJPROP_P(arg4);
|
||||
}
|
||||
} else {
|
||||
opt_ht = Z_ARRVAL_P(arg4);
|
||||
}
|
||||
|
||||
if (php_get_address_from_array(opt_ht, "group", php_sock, &group,
|
||||
&glen) == FAILURE) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue