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