From fee4e1889f366ac59aea4bcd32f049e192f34ca8 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+ndossche@users.noreply.github.com> Date: Wed, 29 Oct 2025 17:23:13 +0100 Subject: [PATCH] mbstring: Avoid pointless refcounted copy (#20325) These scalars can use the ZVAL_COPY_VALUE variant instead of ZVAL_COPY because they don't need refcounting. --- ext/mbstring/mbstring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index 34d759ae30e..ceb182a0a25 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -2788,7 +2788,7 @@ try_again: case IS_FALSE: case IS_LONG: case IS_DOUBLE: - ZVAL_COPY(&entry_tmp, entry); + ZVAL_COPY_VALUE(&entry_tmp, entry); break; case IS_ARRAY: chash = php_mb_convert_encoding_recursive(