Skip to content

Commit e2194c1

Browse files
committed
FETCH_STATIC_PROP_IS may return undef
We don't go out of our way to convert IS_UNDEF to IS_NULL for this opcode. Reflect this in type info.
1 parent d1456d1 commit e2194c1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Zend/Optimizer/zend_inference.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3474,6 +3474,9 @@ static zend_always_inline int _zend_update_type_info(
34743474
tmp |= MAY_BE_REF | MAY_BE_INDIRECT;
34753475
} else {
34763476
tmp &= ~MAY_BE_RC1;
3477+
if (opline->opcode == ZEND_FETCH_STATIC_PROP_IS) {
3478+
tmp |= MAY_BE_UNDEF;
3479+
}
34773480
}
34783481
UPDATE_SSA_TYPE(tmp, ssa_op->result_def);
34793482
if (ce) {

0 commit comments

Comments
 (0)