Skip to content

Commit

Permalink
Fixed type inference
Browse files Browse the repository at this point in the history
  • Loading branch information
dstogov committed Oct 30, 2017
1 parent 63c0ecc commit 230e505
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ext/opcache/Optimizer/zend_inference.c
Original file line number Diff line number Diff line change
Expand Up @@ -3075,7 +3075,13 @@ static int zend_update_type_info(const zend_op_array *op_array,
}
j = zend_ssa_next_use(ssa_ops, ssa_ops[i].result_def, j);
}
UPDATE_SSA_TYPE(tmp, ssa_ops[i].op1_def);
if ((tmp & MAY_BE_ARRAY)
&& (tmp & (MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_KEY_STRING))) {
UPDATE_SSA_TYPE(tmp, ssa_ops[i].op1_def);
} else {
/* invalid key type */
UPDATE_SSA_TYPE(t1, ssa_ops[i].op1_def);
}
COPY_SSA_OBJ_TYPE(ssa_ops[i].op1_use, ssa_ops[i].op1_def);
}
/* FETCH_LIST on a string behaves like FETCH_R on null */
Expand Down

0 comments on commit 230e505

Please sign in to comment.