1
0
mirror of https://github.com/php/php-src.git synced 2026-04-26 09:28:21 +02:00

Don't assign to string offset after exception (This fixes

Zend/tests/bug31098.phpt failure without PROFITABILITY_CHECKS)
This commit is contained in:
Dmitry Stogov
2021-05-21 00:48:24 +03:00
parent cce0cc8836
commit db309b2e4b
+6
View File
@@ -1088,6 +1088,12 @@ static zend_never_inline void zend_assign_to_string_offset(zval *str, zval *dim,
if (UNEXPECTED(Z_TYPE_P(dim) != IS_LONG)) {
offset = zend_check_string_offset(dim/*, BP_VAR_W*/);
if (UNEXPECTED(EG(exception) != NULL)) {
if (UNEXPECTED(result)) {
ZVAL_UNDEF(result);
}
return;
}
} else {
offset = Z_LVAL_P(dim);
}