1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 08:12:21 +01:00

Merge branch 'PHP-8.3' into PHP-8.4

* PHP-8.3:
  Fix may_have_extra_named_args flag for ZEND_AST_UNPACK
This commit is contained in:
Niels Dossche
2025-01-21 19:27:19 +01:00
2 changed files with 7 additions and 5 deletions

1
NEWS
View File

@@ -18,6 +18,7 @@ PHP NEWS
. Fixed potential OOB when checking for trailing spaces on Windows. (cmb)
. Fixed bug GH-17408 (Assertion failure Zend/zend_exceptions.c).
(nielsdos, ilutov)
. Fix may_have_extra_named_args flag for ZEND_AST_UNPACK. (nielsdos)
- DOM:
. Fixed bug GH-17397 (Assertion failure ext/dom/php_dom.c). (nielsdos)

View File

@@ -3753,6 +3753,12 @@ static uint32_t zend_compile_args(
"Cannot use argument unpacking after named arguments");
}
/* Unpack may contain named arguments. */
may_have_undef = 1;
if (!fbc || (fbc->common.fn_flags & ZEND_ACC_VARIADIC)) {
*may_have_extra_named_args = 1;
}
uses_arg_unpack = 1;
fbc = NULL;
@@ -3761,11 +3767,6 @@ static uint32_t zend_compile_args(
opline->op2.num = arg_count;
opline->result.var = EX_NUM_TO_VAR(arg_count - 1);
/* Unpack may contain named arguments. */
may_have_undef = 1;
if (!fbc || (fbc->common.fn_flags & ZEND_ACC_VARIADIC)) {
*may_have_extra_named_args = 1;
}
continue;
}