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 969b56e9e4..b6dfa62c46 100644
--- a/ext/standard/string.c
+++ b/ext/standard/string.c
@@ -3657,7 +3657,7 @@ PHP_FUNCTION(addcslashes)
}
if (ZSTR_LEN(what) == 0) {
- RETURN_STRINGL(ZSTR_VAL(str), ZSTR_LEN(str));
+ RETURN_STR_COPY(str);
}
RETURN_STR(php_addcslashes(str, 0, ZSTR_VAL(what), ZSTR_LEN(what)));