From 5d0499af7e9f00f56274dcb397339f3883ffd03e Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sun, 26 Oct 2025 08:39:33 +0100 Subject: [PATCH 1/2] Don't duplicate protoname for stream wrappers (#20292) This is never used. --- main/streams/userspace.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/main/streams/userspace.c b/main/streams/userspace.c index b1ea8818aeccd..f5e25aa96c772 100644 --- a/main/streams/userspace.c +++ b/main/streams/userspace.c @@ -37,7 +37,6 @@ static int le_protocols; struct php_user_stream_wrapper { php_stream_wrapper wrapper; - char * protoname; zend_class_entry *ce; zend_resource *resource; }; @@ -72,7 +71,6 @@ static void stream_wrapper_dtor(zend_resource *rsrc) { struct php_user_stream_wrapper * uwrap = (struct php_user_stream_wrapper*)rsrc->ptr; - efree(uwrap->protoname); efree(uwrap); } @@ -468,7 +466,6 @@ PHP_FUNCTION(stream_wrapper_register) uwrap = (struct php_user_stream_wrapper *)ecalloc(1, sizeof(*uwrap)); uwrap->ce = ce; - uwrap->protoname = estrndup(ZSTR_VAL(protocol), ZSTR_LEN(protocol)); uwrap->wrapper.wops = &user_stream_wops; uwrap->wrapper.abstract = uwrap; uwrap->wrapper.is_url = ((flags & PHP_STREAM_IS_URL) != 0); From 61b0d589d6ac3bbd498e3e63f7d09de600bdaffc Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sun, 26 Oct 2025 08:56:56 +0100 Subject: [PATCH 2/2] ftp: Fix weird typo (#20295) * ftp: Fix weird typo In 8827f8eca9ed8fbad3254f4640862f1577651733 the async functions were renamed to nb functions. So this was just a find+replace of async to nb. The diff shows that "no asyncronous transfer to continue" was replaced with "no nbronous transfer to continue". Makes no sense. * Update ext/ftp/php_ftp.c Co-authored-by: Jakub Zelenka --------- Co-authored-by: Jakub Zelenka --- ext/ftp/php_ftp.c | 4 ++-- ext/ftp/tests/005.phpt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ext/ftp/php_ftp.c b/ext/ftp/php_ftp.c index 8c6c2e900177c..4d33e4d82535a 100644 --- a/ext/ftp/php_ftp.c +++ b/ext/ftp/php_ftp.c @@ -820,7 +820,7 @@ PHP_FUNCTION(ftp_nb_get) } /* }}} */ -/* {{{ Continues retrieving/sending a file nbronously */ +/* {{{ Continues to retrieve or send a file in non-blocking mode */ PHP_FUNCTION(ftp_nb_continue) { zval *z_ftp; @@ -833,7 +833,7 @@ PHP_FUNCTION(ftp_nb_continue) GET_FTPBUF(ftp, z_ftp); if (!ftp->nb) { - php_error_docref(NULL, E_WARNING, "No nbronous transfer to continue"); + php_error_docref(NULL, E_WARNING, "No non-blocking transfer to continue"); RETURN_LONG(PHP_FTP_FAILED); } diff --git a/ext/ftp/tests/005.phpt b/ext/ftp/tests/005.phpt index 409b60e184715..f08cadd2b4280 100644 --- a/ext/ftp/tests/005.phpt +++ b/ext/ftp/tests/005.phpt @@ -85,7 +85,7 @@ int(-1) Warning: ftp_mkdir(): Command not implemented (7). in %s005.php on line %d bool(false) -Warning: ftp_nb_continue(): No nbronous transfer to continue in %s005.php on line %d +Warning: ftp_nb_continue(): No non-blocking transfer to continue in %s on line %d int(0) ftp_nb_fget(): Argument #4 ($mode) must be either FTP_ASCII or FTP_BINARY ftp_nb_fput(): Argument #4 ($mode) must be either FTP_ASCII or FTP_BINARY