mirror of
https://github.com/php/php-src.git
synced 2024-11-30 21:35:36 +08:00
@- 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:
parent
c6cd319cd4
commit
4df36948c8
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user