@@ -5454,9 +5454,9 @@ static zend_always_inline uint32_t zend_get_arg_offset_by_name(
5454
5454
if (EXPECTED (fbc -> type == ZEND_USER_FUNCTION )
5455
5455
|| EXPECTED (fbc -> common .fn_flags & ZEND_ACC_USER_ARG_INFO )) {
5456
5456
for (uint32_t i = 0 ; i < num_args ; i ++ ) {
5457
- zend_arg_info * arg_info = & fbc -> op_array .arg_info [i ];
5457
+ zend_arg_info * arg_info = & fbc -> common .arg_info [i ];
5458
5458
if (zend_string_equals (arg_name , arg_info -> name )) {
5459
- if (!fbc -> op_array .refcount || !(fbc -> op_array .fn_flags & ZEND_ACC_CLOSURE )) {
5459
+ if (fbc -> type == ZEND_USER_FUNCTION && ( !fbc -> op_array .refcount || !(fbc -> op_array .fn_flags & ZEND_ACC_CLOSURE ) )) {
5460
5460
* cache_slot = unique_id ;
5461
5461
* (uintptr_t * )(cache_slot + 1 ) = i ;
5462
5462
}
@@ -5477,7 +5477,10 @@ static zend_always_inline uint32_t zend_get_arg_offset_by_name(
5477
5477
}
5478
5478
5479
5479
if (fbc -> common .fn_flags & ZEND_ACC_VARIADIC ) {
5480
- if (fbc -> type == ZEND_INTERNAL_FUNCTION || !fbc -> op_array .refcount || !(fbc -> op_array .fn_flags & ZEND_ACC_CLOSURE )) {
5480
+ if ((fbc -> type == ZEND_USER_FUNCTION
5481
+ && (!fbc -> op_array .refcount || !(fbc -> op_array .fn_flags & ZEND_ACC_CLOSURE )))
5482
+ || (fbc -> type == ZEND_INTERNAL_FUNCTION
5483
+ && !(fbc -> common .fn_flags & ZEND_ACC_USER_ARG_INFO ))) {
5481
5484
* cache_slot = unique_id ;
5482
5485
* (uintptr_t * )(cache_slot + 1 ) = fbc -> common .num_args ;
5483
5486
}
0 commit comments