@- 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.
This commit is contained in:
Andrei Zmievski 2000-08-25 13:51:07 +00:00
parent c6cd319cd4
commit 4df36948c8

View File

@ -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);