Skip to content

Commit 102bcb5

Browse files
committed
Update array_element_type inference for previous change
LIST_R and DIM_IS return value can't be MAY_BE_REF anymore.
1 parent 490a49d commit 102bcb5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/opcache/Optimizer/zend_inference.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2059,7 +2059,7 @@ uint32_t zend_array_element_type(zend_op *opline, uint32_t t1)
20592059
tmp |= MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF;
20602060
}
20612061
if (t1 & MAY_BE_ARRAY_OF_REF) {
2062-
if (opline->opcode == ZEND_FETCH_DIM_R) {
2062+
if (!write) {
20632063
/* can't be REF because of ZVAL_COPY_DEREF() usage */
20642064
tmp |= MAY_BE_RC1 | MAY_BE_RCN;
20652065
} else {

0 commit comments

Comments
 (0)