summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Zend/zend_operators.h2
1 files changed, 1 insertions, 1 deletions
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);
}