]> granicus.if.org Git - php/commitdiff
Fixed a bug that would replace only the first occurrence and result in
authorAndrei Zmievski <andrei@php.net>
Fri, 19 Nov 1999 22:28:06 +0000 (22:28 +0000)
committerAndrei Zmievski <andrei@php.net>
Fri, 19 Nov 1999 22:28:06 +0000 (22:28 +0000)
a parse error for the rest when using /e modifier.

ext/pcre/php_pcre.c

index ee8b6218fe82a6ef8d65926a60726480eb6834da..26a10991a3d55d11a39ad47e5630bd1034b9cf0d 100644 (file)
@@ -675,7 +675,7 @@ char *_php_pcre_replace(char *regex, char *subject, char *replace)
                        
                        /* If evaluating, do it and add the return string's length */
                        if (eval) {
-                               eval_result_len = _preg_do_eval(replace, piece, offsets,
+                               eval_result_len = _preg_do_eval(replace, subject, offsets,
                                                                                                count, &eval_result);
                                new_len += eval_result_len;
                        } else { /* do regular substitution */