Skip to content

Commit

Permalink
Fix assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
dstogov committed Jun 11, 2021
1 parent f172bb3 commit c8ff5a1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Zend/Optimizer/zend_inference.c
Original file line number Diff line number Diff line change
Expand Up @@ -2393,13 +2393,13 @@ static zend_always_inline int _zend_update_type_info(
if (!(t1 & (MAY_BE_ANY|MAY_BE_UNDEF|MAY_BE_CLASS))
|| !(t2 & (MAY_BE_ANY|MAY_BE_UNDEF|MAY_BE_CLASS))) {
tmp = 0;
if (ssa_op->result_def >= 0) {
if (ssa_op->result_def >= 0 && !(ssa_var_info[ssa_op->result_def].type & MAY_BE_REF)) {
UPDATE_SSA_TYPE(tmp, ssa_op->result_def);
}
if (ssa_op->op1_def >= 0) {
if (ssa_op->op1_def >= 0 && !(ssa_var_info[ssa_op->op1_def].type & MAY_BE_REF)) {
UPDATE_SSA_TYPE(tmp, ssa_op->op1_def);
}
if (ssa_op->op2_def >= 0) {
if (ssa_op->op2_def >= 0 && !(ssa_var_info[ssa_op->op2_def].type & MAY_BE_REF)) {
UPDATE_SSA_TYPE(tmp, ssa_op->op2_def);
}
return 1;
Expand Down

0 comments on commit c8ff5a1

Please sign in to comment.