mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Merge branch 'PHP-8.3' into PHP-8.4
This commit is contained in:
commit
c00d7e056a
1 changed files with 5 additions and 1 deletions
|
@ -1457,7 +1457,11 @@ void to_zval_read_fd_array(const char *data, zval *zv, res_context *ctx)
|
|||
object_init_ex(&elem, socket_ce);
|
||||
php_socket *sock = Z_SOCKET_P(&elem);
|
||||
|
||||
socket_import_file_descriptor(fd, sock);
|
||||
if (!socket_import_file_descriptor(fd, sock)) {
|
||||
do_to_zval_err(ctx, "error getting protocol descriptor %d: getsockopt() call failed with errno %d", fd, errno);
|
||||
zval_ptr_dtor(&elem);
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
php_stream *stream = php_stream_fopen_from_fd(fd, "rw", NULL);
|
||||
php_stream_to_zval(stream, &elem);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue