Skip to content

Commit 2787e3c

Browse files
authored
Fix incorrect check condition in type inference (#10425)
The "nothing to do" case would never be hit because the switch block would execute if the opcode is ZEND_ASSIGN_STATIC_PROP_OP, not ZEND_ASSIGN_STATIC_PROP. This meant that we were falling through to the else block. Fix this by correcting the check condition.
1 parent 560ca9c commit 2787e3c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Zend/Optimizer/zend_inference.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -2505,7 +2505,7 @@ static zend_always_inline int _zend_update_type_info(
25052505
UPDATE_SSA_TYPE(orig, ssa_op->op1_def);
25062506
COPY_SSA_OBJ_TYPE(ssa_op->op1_use, ssa_op->op1_def);
25072507
}
2508-
} else if (opline->opcode == ZEND_ASSIGN_STATIC_PROP) {
2508+
} else if (opline->opcode == ZEND_ASSIGN_STATIC_PROP_OP) {
25092509
/* Nothing to do */
25102510
} else {
25112511
if (opline->opcode == ZEND_ASSIGN_OP && ssa_op->result_def >= 0 && (tmp & MAY_BE_RC1)) {

0 commit comments

Comments
 (0)