Skip to content

Commit db309b2

Browse files
committed
Don't assign to string offset after exception (This fixes
Zend/tests/bug31098.phpt failure without PROFITABILITY_CHECKS)
1 parent cce0cc8 commit db309b2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ext/opcache/jit/zend_jit_helpers.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1088,6 +1088,12 @@ static zend_never_inline void zend_assign_to_string_offset(zval *str, zval *dim,
10881088

10891089
if (UNEXPECTED(Z_TYPE_P(dim) != IS_LONG)) {
10901090
offset = zend_check_string_offset(dim/*, BP_VAR_W*/);
1091+
if (UNEXPECTED(EG(exception) != NULL)) {
1092+
if (UNEXPECTED(result)) {
1093+
ZVAL_UNDEF(result);
1094+
}
1095+
return;
1096+
}
10911097
} else {
10921098
offset = Z_LVAL_P(dim);
10931099
}

0 commit comments

Comments
 (0)