File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -3349,7 +3349,9 @@ uint32_t zend_compile_args(
3349
3349
3350
3350
/* Unpack may contain named arguments. */
3351
3351
may_have_undef = 1 ;
3352
- * may_have_extra_named_args = 1 ;
3352
+ if (!fbc || (fbc -> common .fn_flags & ZEND_ACC_VARIADIC )) {
3353
+ * may_have_extra_named_args = 1 ;
3354
+ }
3353
3355
continue ;
3354
3356
}
3355
3357
@@ -3369,13 +3371,15 @@ uint32_t zend_compile_args(
3369
3371
/* Using named arguments, but passing in order. */
3370
3372
arg_name = NULL ;
3371
3373
arg_count ++ ;
3374
+ } else {
3375
+ // TODO: We could track which arguments were passed, even if out of order.
3376
+ may_have_undef = 1 ;
3377
+ if (arg_num == (uint32_t ) -1 && (fbc -> common .fn_flags & ZEND_ACC_VARIADIC )) {
3378
+ * may_have_extra_named_args = 1 ;
3379
+ }
3372
3380
}
3373
3381
} else {
3374
3382
arg_num = (uint32_t ) -1 ;
3375
- }
3376
-
3377
- if (arg_name ) {
3378
- // TODO: These could be made more precise if fbc is known.
3379
3383
may_have_undef = 1 ;
3380
3384
* may_have_extra_named_args = 1 ;
3381
3385
}
You can’t perform that action at this time.
0 commit comments