diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS index 15f6620496d45..f14a4d1b0c9f8 100644 --- a/UPGRADING.INTERNALS +++ b/UPGRADING.INTERNALS @@ -35,6 +35,10 @@ PHP 8.6 INTERNALS UPGRADE NOTES . The zval_dtor() alias of zval_ptr_dtor_nogc() has been removed. Call zval_ptr_dtor_nogc() directly instead. . The internal zend_copy_parameters_array() function is no longer exposed. + . The zend_make_callable() function has been removed, if a callable zval + needs to be obtained use the zend_get_callable_zval_from_fcc() function + instead. If this was used to store a callable, then an FCC should be + stored instead. ======================== 2. Build system changes diff --git a/Zend/zend_API.c b/Zend/zend_API.c index e05cc7e506f68..d9c951c928896 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -4232,24 +4232,6 @@ ZEND_API bool zend_is_callable(zval *callable, uint32_t check_flags, zend_string } /* }}} */ -ZEND_API bool zend_make_callable(zval *callable, zend_string **callable_name) /* {{{ */ -{ - zend_fcall_info_cache fcc; - - if (zend_is_callable_ex(callable, NULL, IS_CALLABLE_SUPPRESS_DEPRECATIONS, callable_name, &fcc, NULL)) { - if (Z_TYPE_P(callable) == IS_STRING && fcc.calling_scope) { - zval_ptr_dtor_str(callable); - array_init(callable); - add_next_index_str(callable, zend_string_copy(fcc.calling_scope->name)); - add_next_index_str(callable, zend_string_copy(fcc.function_handler->common.function_name)); - } - zend_release_fcall_info_cache(&fcc); - return 1; - } - return 0; -} -/* }}} */ - ZEND_API zend_result zend_fcall_info_init(zval *callable, uint32_t check_flags, zend_fcall_info *fci, zend_fcall_info_cache *fcc, zend_string **callable_name, char **error) /* {{{ */ { if (!zend_is_callable_ex(callable, NULL, check_flags, callable_name, fcc, error)) { diff --git a/Zend/zend_API.h b/Zend/zend_API.h index 24e686b721efd..440a1874adff1 100644 --- a/Zend/zend_API.h +++ b/Zend/zend_API.h @@ -417,7 +417,6 @@ ZEND_API bool zend_is_callable_at_frame( uint32_t check_flags, zend_fcall_info_cache *fcc, char **error); ZEND_API bool zend_is_callable_ex(zval *callable, zend_object *object, uint32_t check_flags, zend_string **callable_name, zend_fcall_info_cache *fcc, char **error); ZEND_API bool zend_is_callable(zval *callable, uint32_t check_flags, zend_string **callable_name); -ZEND_API bool zend_make_callable(zval *callable, zend_string **callable_name); ZEND_API const char *zend_get_module_version(const char *module_name); ZEND_API zend_result zend_get_module_started(const char *module_name); diff --git a/ext/ftp/ftp.c b/ext/ftp/ftp.c index f9c61748efdda..0c1287a3e7052 100644 --- a/ext/ftp/ftp.c +++ b/ext/ftp/ftp.c @@ -1508,7 +1508,7 @@ static int my_recv(ftpbuf_t *ftp, php_socket_t s, void *buf, size_t len) return (nr_bytes); } -static bool data_available(ftpbuf_t *ftp, php_socket_t s) +static bool data_available(ftpbuf_t *ftp, php_socket_t s, bool silent) { int n; @@ -1516,6 +1516,9 @@ static bool data_available(ftpbuf_t *ftp, php_socket_t s) if (n < 1) { char buf[256]; if (n == 0) { + if (silent) { + return false; + } #ifdef PHP_WIN32 _set_errno(ETIMEDOUT); #else @@ -1831,7 +1834,9 @@ static void ftp_ssl_shutdown(ftpbuf_t *ftp, php_socket_t fd, SSL *ssl_handle) { done = 0; } - while (!done && data_available(ftp, fd)) { + /* Don't report timeouts on the control channel if we're negotiating a shutdown already. + * Some servers don't put a final response. */ + while (!done && data_available(ftp, fd, true)) { ERR_clear_error(); nread = SSL_read(ssl_handle, buf, sizeof(buf)); if (nread <= 0) { @@ -2078,7 +2083,7 @@ int ftp_nb_continue_read(ftpbuf_t *ftp) data = ftp->data; /* check if there is already more data */ - if (!data_available(ftp, data->fd)) { + if (!data_available(ftp, data->fd, false)) { return PHP_FTP_MOREDATA; }