Skip to content

Commit c8ff5a1

Browse files
committed
Fix assertions
1 parent f172bb3 commit c8ff5a1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Zend/Optimizer/zend_inference.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2393,13 +2393,13 @@ static zend_always_inline int _zend_update_type_info(
23932393
if (!(t1 & (MAY_BE_ANY|MAY_BE_UNDEF|MAY_BE_CLASS))
23942394
|| !(t2 & (MAY_BE_ANY|MAY_BE_UNDEF|MAY_BE_CLASS))) {
23952395
tmp = 0;
2396-
if (ssa_op->result_def >= 0) {
2396+
if (ssa_op->result_def >= 0 && !(ssa_var_info[ssa_op->result_def].type & MAY_BE_REF)) {
23972397
UPDATE_SSA_TYPE(tmp, ssa_op->result_def);
23982398
}
2399-
if (ssa_op->op1_def >= 0) {
2399+
if (ssa_op->op1_def >= 0 && !(ssa_var_info[ssa_op->op1_def].type & MAY_BE_REF)) {
24002400
UPDATE_SSA_TYPE(tmp, ssa_op->op1_def);
24012401
}
2402-
if (ssa_op->op2_def >= 0) {
2402+
if (ssa_op->op2_def >= 0 && !(ssa_var_info[ssa_op->op2_def].type & MAY_BE_REF)) {
24032403
UPDATE_SSA_TYPE(tmp, ssa_op->op2_def);
24042404
}
24052405
return 1;

0 commit comments

Comments
 (0)