summaryrefslogtreecommitdiff
path: root/ext/pcre/php_pcre.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/pcre/php_pcre.c')
-rw-r--r--ext/pcre/php_pcre.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c
index 9045d43bcd..0884e6b929 100644
--- a/ext/pcre/php_pcre.c
+++ b/ext/pcre/php_pcre.c
@@ -1245,8 +1245,9 @@ PHP_FUNCTION(preg_split)
add_offset_pair(return_value, &Z_STRVAL_PP(subject)[start_offset], Z_STRLEN_PP(subject) - start_offset, start_offset);
} else {
/* Add the last piece to the return value */
- add_next_index_string(return_value,
- &Z_STRVAL_PP(subject)[start_offset], 1);
+ add_next_index_stringl(return_value,
+ &Z_STRVAL_PP(subject)[start_offset],
+ Z_STRLEN_PP(subject) - start_offset, 1);
}
}