Commit 210704258a8 for php.net
commit 210704258a80a8746e2241a943490985b779043e
Merge: 043ade6d655 583be5a8ca6
Author: ndossche <7771979+ndossche@users.noreply.github.com>
Date: Mon Mar 2 23:12:48 2026 +0100
Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
Fix compile warnings under GCC 15.2.1 (#21320)
diff --cc ext/standard/exec.c
index 762d8bee13c,0a602908fcd..7bacc976eac
--- a/ext/standard/exec.c
+++ b/ext/standard/exec.c
@@@ -272,10 -282,10 +272,10 @@@ PHPAPI zend_string *php_escape_shell_cm
size_t x, y;
zend_string *cmd;
#ifndef PHP_WIN32
- char *p = NULL;
+ const char *p = NULL;
#endif
- ZEND_ASSERT(ZSTR_LEN(unescaped_cmd) == strlen(ZSTR_VAL(unescaped_cmd)) && "Must be a binary safe string");
+ ZEND_ASSERT(!zend_str_has_nul_byte(unescaped_cmd) && "Must be a binary safe string");
size_t l = ZSTR_LEN(unescaped_cmd);
const char *str = ZSTR_VAL(unescaped_cmd);
diff --cc ext/standard/filters.c
index 34393be54d8,2ac26b3bf0c..0faa0eda686
--- a/ext/standard/filters.c
+++ b/ext/standard/filters.c
@@@ -1557,8 -1557,9 +1557,8 @@@ static const php_stream_filter_ops strf
static php_stream_filter *strfilter_convert_create(const char *filtername, zval *filterparams, uint8_t persistent)
{
php_convert_filter *inst;
- php_stream_filter *retval = NULL;
- char *dot;
+ const char *dot;
int conv_mode = 0;
if (filterparams != NULL && Z_TYPE_P(filterparams) != IS_ARRAY) {
diff --cc ext/standard/user_filters.c
index 9f577029f69,83b1986b82a..002456c2ffe
--- a/ext/standard/user_filters.c
+++ b/ext/standard/user_filters.c
@@@ -305,9 -305,13 +305,9 @@@ static php_stream_filter *user_filter_f
}
filter = php_stream_filter_alloc(&userfilter_ops, NULL, 0);
- if (filter == NULL) {
- zval_ptr_dtor(&obj);
- return NULL;
- }
/* filtername */
- add_property_string(&obj, "filtername", (char*)filtername);
+ add_property_string(&obj, "filtername", filtername);
/* and the parameters, if any */
if (filterparams) {