Skip to content

Commit

Permalink
Fixed type-infer on ZEND_FETCH_DIM_FUNC_ARG
Browse files Browse the repository at this point in the history
  • Loading branch information
laruence committed Aug 17, 2017
1 parent 4e03ebc commit 30fb70d
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 @@ -2978,9 +2978,15 @@ static int zend_update_type_info(const zend_op_array *op_array,
}
tmp |= MAY_BE_ARRAY | MAY_BE_RC1;
}
if (t1 & (MAY_BE_STRING|MAY_BE_ARRAY)) {
if (t1 & MAY_BE_STRING) {
tmp |= MAY_BE_RC1;
}
if (t1 & MAY_BE_ARRAY) {
tmp |= MAY_BE_RC1;
if (opline->opcode == ZEND_FETCH_DIM_FUNC_ARG) {
tmp |= MAY_BE_RCN;
}
}
if (t1 & (MAY_BE_OBJECT|MAY_BE_RESOURCE)) {
tmp |= t1 & (MAY_BE_RC1|MAY_BE_RCN);
}
Expand Down

0 comments on commit 30fb70d

Please sign in to comment.