@@ -1268,6 +1268,7 @@ ZEND_VM_C_LABEL(assign_dim_op_new_array):
1268
1268
if (UNEXPECTED (RETURN_VALUE_USED (opline ))) {
1269
1269
ZVAL_COPY (EX_VAR (opline -> result .var ), var_ptr );
1270
1270
}
1271
+ FREE_OP (free_op_data1 );
1271
1272
} else {
1272
1273
if (EXPECTED (Z_ISREF_P (container ))) {
1273
1274
container = Z_REFVAL_P (container );
@@ -1279,42 +1280,27 @@ ZEND_VM_C_LABEL(assign_dim_op_new_array):
1279
1280
dim = GET_OP2_ZVAL_PTR (BP_VAR_R );
1280
1281
1281
1282
if (EXPECTED (Z_TYPE_P (container ) == IS_OBJECT )) {
1282
- value = get_op_data_zval_ptr_r ((opline + 1 )-> op1_type , (opline + 1 )-> op1 , & free_op_data1 );
1283
1283
if (OP2_TYPE == IS_CONST && Z_EXTRA_P (dim ) == ZEND_EXTRA_VALUE ) {
1284
1284
dim ++ ;
1285
1285
}
1286
- zend_binary_assign_op_obj_dim (container , dim , value OPLINE_CC EXECUTE_DATA_CC );
1286
+ zend_binary_assign_op_obj_dim (container , dim OPLINE_CC EXECUTE_DATA_CC );
1287
+ } else if (EXPECTED (Z_TYPE_P (container ) <= IS_FALSE )) {
1288
+ if (OP1_TYPE == IS_CV && UNEXPECTED (Z_TYPE_INFO_P (container ) == IS_UNDEF )) {
1289
+ ZVAL_NULL (container );
1290
+ ZVAL_UNDEFINED_OP1 ();
1291
+ }
1292
+ ZVAL_ARR (container , zend_new_array (8 ));
1293
+ ZEND_VM_C_GOTO (assign_dim_op_new_array );
1287
1294
} else {
1288
- if (UNEXPECTED (Z_TYPE_P (container ) == IS_STRING )) {
1289
- if (OP2_TYPE == IS_UNUSED ) {
1290
- zend_use_new_element_for_string ();
1291
- } else {
1292
- zend_check_string_offset (dim , BP_VAR_RW EXECUTE_DATA_CC );
1293
- zend_wrong_string_offset (EXECUTE_DATA_C );
1294
- }
1295
- UNDEF_RESULT ();
1296
- } else if (EXPECTED (Z_TYPE_P (container ) <= IS_FALSE )) {
1297
- if (OP1_TYPE == IS_CV && UNEXPECTED (Z_TYPE_INFO_P (container ) == IS_UNDEF )) {
1298
- ZVAL_NULL (container );
1299
- ZVAL_UNDEFINED_OP1 ();
1300
- }
1301
- ZVAL_ARR (container , zend_new_array (8 ));
1302
- ZEND_VM_C_GOTO (assign_dim_op_new_array );
1303
- } else {
1304
- if (UNEXPECTED (OP1_TYPE != IS_VAR || EXPECTED (!Z_ISERROR_P (container )))) {
1305
- zend_use_scalar_as_array ();
1306
- }
1295
+ zend_binary_assign_op_dim_slow (container , dim OPLINE_CC EXECUTE_DATA_CC );
1307
1296
ZEND_VM_C_LABEL (assign_dim_op_ret_null ):
1308
- if (UNEXPECTED (RETURN_VALUE_USED (opline ))) {
1309
- ZVAL_NULL (EX_VAR (opline -> result .var ));
1310
- }
1297
+ if (UNEXPECTED (RETURN_VALUE_USED (opline ))) {
1298
+ ZVAL_NULL (EX_VAR (opline -> result .var ));
1311
1299
}
1312
- value = get_op_data_zval_ptr_r ((opline + 1 )-> op1_type , (opline + 1 )-> op1 , & free_op_data1 );
1313
1300
}
1314
1301
}
1315
1302
1316
1303
FREE_OP2 ();
1317
- FREE_OP (free_op_data1 );
1318
1304
FREE_OP1_VAR_PTR ();
1319
1305
ZEND_VM_NEXT_OPCODE_EX (1 , 2 );
1320
1306
}
0 commit comments