diff options
author | Andrei Zmievski <andrei@php.net> | 2000-08-25 13:51:07 +0000 |
---|---|---|
committer | Andrei Zmievski <andrei@php.net> | 2000-08-25 13:51:07 +0000 |
commit | 4df36948c865285c192af5c2772e9be02485cca7 (patch) | |
tree | 3b26a71b3fba87fcb34ed085657764be958b4786 /ext/pcre | |
parent | c6cd319cd47ad95d9401a574c3f7c194428ae036 (diff) | |
download | php-git-4df36948c865285c192af5c2772e9be02485cca7.tar.gz |
@- Fixed a bug in preg_replace() that would truncate subject string if the
@ first argument was en empty array. (Andrei)
This fixes bug #6346, that would truncate subject string if the
first argument was en empty array.
Diffstat (limited to 'ext/pcre')
-rw-r--r-- | ext/pcre/php_pcre.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index 7c6f75b477..6a5a74de9c 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -786,6 +786,7 @@ static char *php_replace_in_subject(zval *regex, zval *replace, zval **subject, /* Duplicate subject string for repeated replacement */ subject_value = estrndup((*subject)->value.str.val, (*subject)->value.str.len); subject_len = (*subject)->value.str.len; + *result_len = subject_len; zend_hash_internal_pointer_reset(regex->value.ht); |