summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/standard/string.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/standard/string.c b/ext/standard/string.c
index dc69a8a3ac..6d5b1f223e 100644
--- a/ext/standard/string.c
+++ b/ext/standard/string.c
@@ -4550,7 +4550,7 @@ PHP_FUNCTION(setlocale)
}
if (len == loc->len && !memcmp(loc->val, retval, len)) {
BG(locale_string) = zend_string_copy(loc);
- RETURN_STR(BG(locale_string));
+ RETURN_STR(zend_string_copy(BG(locale_string)));
} else {
BG(locale_string) = zend_string_init(retval, len, 0);
zend_string_release(loc);