Fixed ext/bz2/tests/005.phpt test failure introduesed by 09547c64c2

This commit is contained in:
Dmitry Stogov 2021-12-02 10:32:45 +03:00
parent 999c6f2c5d
commit df16da3697
2 changed files with 6 additions and 0 deletions

View file

@ -1539,6 +1539,9 @@ static zend_never_inline void zend_assign_to_string_offset(zval *str, zval *dim,
} else {
s = zend_string_init(Z_STRVAL_P(str), Z_STRLEN_P(str), 0);
ZSTR_H(s) = ZSTR_H(Z_STR_P(str));
if (Z_REFCOUNTED_P(str)) {
zend_string_release_ex(Z_STR_P(str), 0);
}
ZVAL_NEW_STR(str, s);
}

View file

@ -1136,6 +1136,9 @@ static zend_never_inline void zend_assign_to_string_offset(zval *str, zval *dim,
} else {
s = zend_string_init(Z_STRVAL_P(str), Z_STRLEN_P(str), 0);
ZSTR_H(s) = ZSTR_H(Z_STR_P(str));
if (Z_REFCOUNTED_P(str)) {
zend_string_release_ex(Z_STR_P(str), 0);
}
ZVAL_NEW_STR(str, s);
}