Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions UPGRADING.INTERNALS
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 0 additions & 18 deletions Zend/zend_API.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down
1 change: 0 additions & 1 deletion Zend/zend_API.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
11 changes: 8 additions & 3 deletions ext/ftp/ftp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1508,14 +1508,17 @@ 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;

n = my_poll(s, PHP_POLLREADABLE, 1000);
if (n < 1) {
char buf[256];
if (n == 0) {
if (silent) {
return false;
}
#ifdef PHP_WIN32
_set_errno(ETIMEDOUT);
#else
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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;
}

Expand Down