summaryrefslogtreecommitdiff
path: root/ext/standard/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/standard/string.c')
-rw-r--r--ext/standard/string.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/standard/string.c b/ext/standard/string.c
index 2617c681b3..e7b36a27ac 100644
--- a/ext/standard/string.c
+++ b/ext/standard/string.c
@@ -2168,6 +2168,7 @@ PHP_FUNCTION(substr_replace)
}
if (argc > 3) {
+ SEPARATE_ZVAL(len);
if (Z_TYPE_PP(len) != IS_ARRAY) {
convert_to_long_ex(len);
l = Z_LVAL_PP(len);