File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -3210,12 +3210,18 @@ static zend_always_inline int _zend_update_type_info(
3210
3210
break ;
3211
3211
case ZEND_FE_FETCH_R :
3212
3212
case ZEND_FE_FETCH_RW :
3213
- tmp = t2 & MAY_BE_REF ;
3213
+ tmp = 0 ;
3214
+ if (opline -> op2_type == IS_CV ) {
3215
+ tmp = t2 & MAY_BE_REF ;
3216
+ }
3214
3217
if (t1 & MAY_BE_OBJECT ) {
3215
3218
if (opline -> opcode == ZEND_FE_FETCH_RW ) {
3216
3219
tmp |= MAY_BE_REF | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF ;
3217
3220
} else {
3218
- tmp |= MAY_BE_REF | MAY_BE_RCN | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF ;
3221
+ tmp |= MAY_BE_RCN | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF ;
3222
+ if (opline -> op2_type != IS_CV ) {
3223
+ tmp |= MAY_BE_REF ;
3224
+ }
3219
3225
}
3220
3226
}
3221
3227
if (t1 & MAY_BE_ARRAY ) {
@@ -3228,6 +3234,9 @@ static zend_always_inline int _zend_update_type_info(
3228
3234
}
3229
3235
if (t1 & MAY_BE_ARRAY_OF_REF ) {
3230
3236
tmp |= MAY_BE_RC1 | MAY_BE_RCN ;
3237
+ if (opline -> op2_type != IS_CV ) {
3238
+ tmp |= MAY_BE_REF ;
3239
+ }
3231
3240
} else if (tmp & (MAY_BE_STRING |MAY_BE_ARRAY |MAY_BE_OBJECT |MAY_BE_RESOURCE )) {
3232
3241
tmp |= MAY_BE_RC1 | MAY_BE_RCN ;
3233
3242
}
You can’t perform that action at this time.
0 commit comments