From: Dmitry Stogov Date: Wed, 5 Jun 2019 22:40:40 +0000 (+0300) Subject: Fixed reference-counting X-Git-Tag: php-7.4.0alpha1~75 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=90a2e4ba668e89e59301abfe71175b0c0d1f9b96;p=php Fixed reference-counting --- diff --git a/Zend/zend_operators.h b/Zend/zend_operators.h index 458ca66e2e..45c8305c34 100644 --- a/Zend/zend_operators.h +++ b/Zend/zend_operators.h @@ -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); }