@@ -2736,9 +2736,8 @@ static int ZEND_FASTCALL ZEND_SEND_VAL_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_A
2736
2736
2737
2737
SAVE_OPLINE();
2738
2738
if (opline->extended_value == ZEND_DO_FCALL_BY_NAME) {
2739
- int arg_num = opline->op2.num + EX(call)->num_additional_args;
2740
- if (ARG_MUST_BE_SENT_BY_REF(EX(call)->fbc, arg_num)) {
2741
- zend_error_noreturn(E_ERROR, "Cannot pass parameter %d by reference", arg_num);
2739
+ if (ARG_MUST_BE_SENT_BY_REF(EX(call)->fbc, opline->op2.num)) {
2740
+ zend_error_noreturn(E_ERROR, "Cannot pass parameter %d by reference", opline->op2.num);
2742
2741
}
2743
2742
}
2744
2743
@@ -8094,9 +8093,8 @@ static int ZEND_FASTCALL ZEND_SEND_VAL_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARG
8094
8093
8095
8094
SAVE_OPLINE();
8096
8095
if (opline->extended_value == ZEND_DO_FCALL_BY_NAME) {
8097
- int arg_num = opline->op2.num + EX(call)->num_additional_args;
8098
- if (ARG_MUST_BE_SENT_BY_REF(EX(call)->fbc, arg_num)) {
8099
- zend_error_noreturn(E_ERROR, "Cannot pass parameter %d by reference", arg_num);
8096
+ if (ARG_MUST_BE_SENT_BY_REF(EX(call)->fbc, opline->op2.num)) {
8097
+ zend_error_noreturn(E_ERROR, "Cannot pass parameter %d by reference", opline->op2.num);
8100
8098
}
8101
8099
}
8102
8100
@@ -13385,16 +13383,14 @@ static int ZEND_FASTCALL ZEND_SEND_VAR_NO_REF_SPEC_VAR_HANDLER(ZEND_OPCODE_HAND
13385
13383
USE_OPLINE
13386
13384
zend_free_op free_op1;
13387
13385
zval *varptr;
13388
- int arg_num;
13389
13386
13390
13387
SAVE_OPLINE();
13391
13388
if (opline->extended_value & ZEND_ARG_COMPILE_TIME_BOUND) { /* Had function_ptr at compile_time */
13392
13389
if (!(opline->extended_value & ZEND_ARG_SEND_BY_REF)) {
13393
13390
return zend_send_by_var_helper_SPEC_VAR(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
13394
13391
}
13395
13392
} else {
13396
- arg_num = opline->op2.num + EX(call)->num_additional_args;
13397
- if (!ARG_SHOULD_BE_SENT_BY_REF(EX(call)->fbc, arg_num)) {
13393
+ if (!ARG_SHOULD_BE_SENT_BY_REF(EX(call)->fbc, opline->op2.num)) {
13398
13394
return zend_send_by_var_helper_SPEC_VAR(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
13399
13395
}
13400
13396
}
@@ -13414,7 +13410,7 @@ static int ZEND_FASTCALL ZEND_SEND_VAR_NO_REF_SPEC_VAR_HANDLER(ZEND_OPCODE_HAND
13414
13410
13415
13411
if ((opline->extended_value & ZEND_ARG_COMPILE_TIME_BOUND) ?
13416
13412
!(opline->extended_value & ZEND_ARG_SEND_SILENT) :
13417
- !ARG_MAY_BE_SENT_BY_REF(EX(call)->fbc, arg_num )) {
13413
+ !ARG_MAY_BE_SENT_BY_REF(EX(call)->fbc, opline->op2.num )) {
13418
13414
zend_error(E_STRICT, "Only variables should be passed by reference");
13419
13415
}
13420
13416
ALLOC_ZVAL(valptr);
@@ -13452,8 +13448,7 @@ static int ZEND_FASTCALL ZEND_SEND_REF_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARG
13452
13448
13453
13449
if (opline->extended_value == ZEND_DO_FCALL_BY_NAME &&
13454
13450
EX(function_state).function->type == ZEND_INTERNAL_FUNCTION) {
13455
- int arg_num = opline->op2.num + EX(call)->num_additional_args;
13456
- if (!ARG_SHOULD_BE_SENT_BY_REF(EX(call)->fbc, arg_num)) {
13451
+ if (!ARG_SHOULD_BE_SENT_BY_REF(EX(call)->fbc, opline->op2.num)) {
13457
13452
return zend_send_by_var_helper_SPEC_VAR(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
13458
13453
}
13459
13454
}
@@ -13473,8 +13468,7 @@ static int ZEND_FASTCALL ZEND_SEND_VAR_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARG
13473
13468
USE_OPLINE
13474
13469
13475
13470
if (opline->extended_value == ZEND_DO_FCALL_BY_NAME) {
13476
- int arg_num = opline->op2.num + EX(call)->num_additional_args;
13477
- if (ARG_SHOULD_BE_SENT_BY_REF(EX(call)->fbc, arg_num)) {
13471
+ if (ARG_SHOULD_BE_SENT_BY_REF(EX(call)->fbc, opline->op2.num)) {
13478
13472
return ZEND_SEND_REF_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
13479
13473
}
13480
13474
}
@@ -31000,16 +30994,14 @@ static int ZEND_FASTCALL ZEND_SEND_VAR_NO_REF_SPEC_CV_HANDLER(ZEND_OPCODE_HANDL
31000
30994
USE_OPLINE
31001
30995
31002
30996
zval *varptr;
31003
- int arg_num;
31004
30997
31005
30998
SAVE_OPLINE();
31006
30999
if (opline->extended_value & ZEND_ARG_COMPILE_TIME_BOUND) { /* Had function_ptr at compile_time */
31007
31000
if (!(opline->extended_value & ZEND_ARG_SEND_BY_REF)) {
31008
31001
return zend_send_by_var_helper_SPEC_CV(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
31009
31002
}
31010
31003
} else {
31011
- arg_num = opline->op2.num + EX(call)->num_additional_args;
31012
- if (!ARG_SHOULD_BE_SENT_BY_REF(EX(call)->fbc, arg_num)) {
31004
+ if (!ARG_SHOULD_BE_SENT_BY_REF(EX(call)->fbc, opline->op2.num)) {
31013
31005
return zend_send_by_var_helper_SPEC_CV(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
31014
31006
}
31015
31007
}
@@ -31029,7 +31021,7 @@ static int ZEND_FASTCALL ZEND_SEND_VAR_NO_REF_SPEC_CV_HANDLER(ZEND_OPCODE_HANDL
31029
31021
31030
31022
if ((opline->extended_value & ZEND_ARG_COMPILE_TIME_BOUND) ?
31031
31023
!(opline->extended_value & ZEND_ARG_SEND_SILENT) :
31032
- !ARG_MAY_BE_SENT_BY_REF(EX(call)->fbc, arg_num )) {
31024
+ !ARG_MAY_BE_SENT_BY_REF(EX(call)->fbc, opline->op2.num )) {
31033
31025
zend_error(E_STRICT, "Only variables should be passed by reference");
31034
31026
}
31035
31027
ALLOC_ZVAL(valptr);
@@ -31067,8 +31059,7 @@ static int ZEND_FASTCALL ZEND_SEND_REF_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS
31067
31059
31068
31060
if (opline->extended_value == ZEND_DO_FCALL_BY_NAME &&
31069
31061
EX(function_state).function->type == ZEND_INTERNAL_FUNCTION) {
31070
- int arg_num = opline->op2.num + EX(call)->num_additional_args;
31071
- if (!ARG_SHOULD_BE_SENT_BY_REF(EX(call)->fbc, arg_num)) {
31062
+ if (!ARG_SHOULD_BE_SENT_BY_REF(EX(call)->fbc, opline->op2.num)) {
31072
31063
return zend_send_by_var_helper_SPEC_CV(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
31073
31064
}
31074
31065
}
@@ -31087,8 +31078,7 @@ static int ZEND_FASTCALL ZEND_SEND_VAR_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS
31087
31078
USE_OPLINE
31088
31079
31089
31080
if (opline->extended_value == ZEND_DO_FCALL_BY_NAME) {
31090
- int arg_num = opline->op2.num + EX(call)->num_additional_args;
31091
- if (ARG_SHOULD_BE_SENT_BY_REF(EX(call)->fbc, arg_num)) {
31081
+ if (ARG_SHOULD_BE_SENT_BY_REF(EX(call)->fbc, opline->op2.num)) {
31092
31082
return ZEND_SEND_REF_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
31093
31083
}
31094
31084
}
0 commit comments