Fixed reference-counting

This commit is contained in:
Dmitry Stogov 2019-06-06 01:40:40 +03:00
parent bed8ae1d0f
commit 90a2e4ba66

View File

@ -287,7 +287,7 @@ static zend_always_inline void zend_tmp_string_release(zend_string *tmp) {
/* Like zval_get_string, but returns NULL if the conversion fails with an exception. */
static zend_always_inline zend_string *zval_try_get_string(zval *op) {
if (EXPECTED(Z_TYPE_P(op) == IS_STRING)) {
return Z_STR_P(op);
return zend_string_copy(Z_STR_P(op));
} else {
return zval_try_get_string_func(op);
}