Skip to content

Commit e3aa739

Browse files
committed
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1: Fix updating SSA object type for *_ASSIGN_OP (#10458)
2 parents cec528d + d94ddbe commit e3aa739

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Zend/Optimizer/zend_inference.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2496,7 +2496,7 @@ static zend_always_inline zend_result _zend_update_type_info(
24962496
if (opline->opcode == ZEND_ASSIGN_OBJ_OP) {
24972497
prop_info = zend_fetch_prop_info(op_array, ssa, opline, ssa_op);
24982498
orig = t1;
2499-
t1 = zend_fetch_prop_type(script, prop_info, &ce);
2499+
t1 = zend_fetch_prop_type(script, prop_info, NULL);
25002500
t2 = OP1_DATA_INFO();
25012501
} else if (opline->opcode == ZEND_ASSIGN_DIM_OP) {
25022502
if (t1 & MAY_BE_ARRAY_OF_REF) {
@@ -2507,7 +2507,7 @@ static zend_always_inline zend_result _zend_update_type_info(
25072507
t2 = OP1_DATA_INFO();
25082508
} else if (opline->opcode == ZEND_ASSIGN_STATIC_PROP_OP) {
25092509
prop_info = zend_fetch_static_prop_info(script, op_array, ssa, opline);
2510-
t1 = zend_fetch_prop_type(script, prop_info, &ce);
2510+
t1 = zend_fetch_prop_type(script, prop_info, NULL);
25112511
t2 = OP1_DATA_INFO();
25122512
} else {
25132513
if (t1 & MAY_BE_REF) {
@@ -2569,7 +2569,7 @@ static zend_always_inline zend_result _zend_update_type_info(
25692569
} else if (opline->opcode == ZEND_ASSIGN_OBJ_OP) {
25702570
/* The return value must also satisfy the property type */
25712571
if (prop_info) {
2572-
t1 = zend_fetch_prop_type(script, prop_info, NULL);
2572+
t1 = zend_fetch_prop_type(script, prop_info, &ce);
25732573
if ((t1 & (MAY_BE_LONG|MAY_BE_DOUBLE)) == MAY_BE_LONG
25742574
&& (tmp & (MAY_BE_LONG|MAY_BE_DOUBLE)) == MAY_BE_DOUBLE) {
25752575
/* DOUBLE may be auto-converted to LONG */
@@ -2581,7 +2581,7 @@ static zend_always_inline zend_result _zend_update_type_info(
25812581
} else if (opline->opcode == ZEND_ASSIGN_STATIC_PROP_OP) {
25822582
/* The return value must also satisfy the property type */
25832583
if (prop_info) {
2584-
t1 = zend_fetch_prop_type(script, prop_info, NULL);
2584+
t1 = zend_fetch_prop_type(script, prop_info, &ce);
25852585
if ((t1 & (MAY_BE_LONG|MAY_BE_DOUBLE)) == MAY_BE_LONG
25862586
&& (tmp & (MAY_BE_LONG|MAY_BE_DOUBLE)) == MAY_BE_DOUBLE) {
25872587
/* DOUBLE may be auto-converted to LONG */

0 commit comments

Comments
 (0)