From 90a2e4ba668e89e59301abfe71175b0c0d1f9b96 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Thu, 6 Jun 2019 01:40:40 +0300 Subject: Fixed reference-counting --- Zend/zend_operators.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zend/zend_operators.h') 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); } -- cgit v1.2.1