mirror of
https://github.com/php/php-src.git
synced 2024-09-22 10:27:25 +00:00
Merge branch 'PHP-7.4'
This commit is contained in:
commit
22797c0e00
@ -904,6 +904,7 @@ static int php_sock_array_to_fd_set(zval *sock_array, fd_set *fds, PHP_SOCKET *m
|
||||
if (Z_TYPE_P(sock_array) != IS_ARRAY) return 0;
|
||||
|
||||
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(sock_array), element) {
|
||||
ZVAL_DEREF(element);
|
||||
php_sock = (php_socket*) zend_fetch_resource_ex(element, le_socket_name, le_socket);
|
||||
if (!php_sock) continue; /* If element is not a resource, skip it */
|
||||
|
||||
@ -932,6 +933,7 @@ static int php_sock_array_from_fd_set(zval *sock_array, fd_set *fds) /* {{{ */
|
||||
|
||||
array_init(&new_hash);
|
||||
ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(sock_array), num_key, key, element) {
|
||||
ZVAL_DEREF(element);
|
||||
php_sock = (php_socket*) zend_fetch_resource_ex(element, le_socket_name, le_socket);
|
||||
if (!php_sock) continue; /* If element is not a resource, skip it */
|
||||
|
||||
|
@ -17,6 +17,7 @@ socket_create_pair($domain, SOCK_STREAM, 0, $sockets);
|
||||
|
||||
$write = null;
|
||||
$except = null;
|
||||
$ref =& $sockets[0]; // bug #78038
|
||||
var_dump(socket_select($sockets, $write, $except, 0));
|
||||
--EXPECT--
|
||||
int(0)
|
||||
|
Loading…
Reference in New Issue
Block a user