Skip to content

Commit 85e0238

Browse files
committed
Properly check for IS_UNDEF when optimizing
1 parent 9f410c2 commit 85e0238

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ext/opcache/Optimizer/dfa_pass.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,8 @@ int zend_dfa_optimize_calls(zend_op_array *op_array, zend_ssa *ssa)
448448
ssa_op->op1_use_chain = var->use_chain;
449449
var->use_chain = op_num;
450450
}
451-
if (zend_hash_num_elements(src) == 0) {
451+
if (zend_hash_num_elements(src) == 0 &&
452+
!(ssa->var_info[ssa_op->op1_use].type & MAY_BE_UNDEF)) {
452453
/* TODO remove needle from the uses of ssa graph? */
453454
ZVAL_FALSE(&tmp);
454455
zend_array_destroy(dst);

0 commit comments

Comments
 (0)