diff options
author | Andrei Zmievski <andrei@php.net> | 1999-11-19 22:59:12 +0000 |
---|---|---|
committer | Andrei Zmievski <andrei@php.net> | 1999-11-19 22:59:12 +0000 |
commit | 3ae0f5fdc46b5e963c7f88dd6ee9ca4ea101d818 (patch) | |
tree | d53f36f846bbde45e1be17661752ea0f5db7825e | |
parent | 71a8c018cbf83b1b9d72afb43cef0d2633412737 (diff) | |
download | php-git-3ae0f5fdc46b5e963c7f88dd6ee9ca4ea101d818.tar.gz |
(PHP preg_replace) Fixed a bug that cause backreferences to lose
their value after the first occurrence.
-rw-r--r-- | ext/pcre/php_pcre.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index 26a10991a3..22bc7638f3 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -719,7 +719,7 @@ char *_php_pcre_replace(char *regex, char *subject, char *replace) backref < count) { match_len = offsets[(backref<<1)+1] - offsets[backref<<1]; memcpy (walkbuf, - piece + offsets[backref<<1], + subject + offsets[backref<<1], match_len); walkbuf += match_len; walk += (backref > 9) ? 3 : 2; |