File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ PHP NEWS
1818 . Fixed potential OOB when checking for trailing spaces on Windows. (cmb)
1919 . Fixed bug GH-17408 (Assertion failure Zend/zend_exceptions.c).
2020 (nielsdos, ilutov)
21+ . Fix may_have_extra_named_args flag for ZEND_AST_UNPACK. (nielsdos)
2122
2223- DOM:
2324 . Fixed bug GH-17397 (Assertion failure ext/dom/php_dom.c). (nielsdos)
Original file line number Diff line number Diff line change @@ -3753,6 +3753,12 @@ static uint32_t zend_compile_args(
37533753 "Cannot use argument unpacking after named arguments" );
37543754 }
37553755
3756+ /* Unpack may contain named arguments. */
3757+ may_have_undef = 1 ;
3758+ if (!fbc || (fbc -> common .fn_flags & ZEND_ACC_VARIADIC )) {
3759+ * may_have_extra_named_args = 1 ;
3760+ }
3761+
37563762 uses_arg_unpack = 1 ;
37573763 fbc = NULL ;
37583764
@@ -3761,11 +3767,6 @@ static uint32_t zend_compile_args(
37613767 opline -> op2 .num = arg_count ;
37623768 opline -> result .var = EX_NUM_TO_VAR (arg_count - 1 );
37633769
3764- /* Unpack may contain named arguments. */
3765- may_have_undef = 1 ;
3766- if (!fbc || (fbc -> common .fn_flags & ZEND_ACC_VARIADIC )) {
3767- * may_have_extra_named_args = 1 ;
3768- }
37693770 continue ;
37703771 }
37713772
You can’t perform that action at this time.
0 commit comments