cvs: php4 /ext/pcre php_pcre.c
| From: | Andrei Zmievski | Date: | Fri, 25 Aug 2000 13:51:07 +0000 |
| Subject: | cvs: php4 /ext/pcre php_pcre.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-1387@lists.php.net to get a copy of this message | ||
andrei Fri Aug 25 06:51:07 2000 EDT
Modified files:
/php4/ext/pcre php_pcre.c
Log:
@- 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.
Index: php4/ext/pcre/php_pcre.c
diff -u php4/ext/pcre/php_pcre.c:1.66 php4/ext/pcre/php_pcre.c:1.67
--- php4/ext/pcre/php_pcre.c:1.66 Thu Aug 24 06:23:13 2000
+++ php4/ext/pcre/php_pcre.c Fri Aug 25 06:51:07 2000
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_pcre.c,v 1.66 2000/08/24 13:23:13 andrei Exp $ */
+/* $Id: php_pcre.c,v 1.67 2000/08/25 13:51:07 andrei Exp $ */
/*
TODO:
@@ -786,6 +786,7 @@
/* 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);