Skip to content

Commit 8e5f54e

Browse files
committed
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0: Fix type inference for assign to string offset with invalid index.
2 parents 56430ef + b80d30d commit 8e5f54e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Zend/Optimizer/zend_inference.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2667,7 +2667,7 @@ static zend_always_inline int _zend_update_type_info(
26672667
if (ssa_op->result_def >= 0) {
26682668
tmp = 0;
26692669
if (t1 & MAY_BE_STRING) {
2670-
tmp |= MAY_BE_STRING;
2670+
tmp |= MAY_BE_STRING | MAY_BE_NULL;
26712671
}
26722672
if (t1 & (MAY_BE_ARRAY|MAY_BE_FALSE|MAY_BE_NULL|MAY_BE_UNDEF)) {
26732673
tmp |= (OP1_DATA_INFO() & (MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF));

0 commit comments

Comments
 (0)