diff options
author | Moriyoshi Koizumi <moriyoshi@php.net> | 2003-02-14 18:59:50 +0000 |
---|---|---|
committer | Moriyoshi Koizumi <moriyoshi@php.net> | 2003-02-14 18:59:50 +0000 |
commit | 9b49146dc1800d865be931a459d10ef1b51e72dc (patch) | |
tree | e94484adc214d7715957f7868693e11f385d0ef1 /ext/standard/string.c | |
parent | b3a8349191d1c29745cd1640c66eafa7d85b12a4 (diff) | |
download | php-git-9b49146dc1800d865be931a459d10ef1b51e72dc.tar.gz |
Fixed a str_replace() bug similar to bug #22224
Diffstat (limited to 'ext/standard/string.c')
-rw-r--r-- | ext/standard/string.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/standard/string.c b/ext/standard/string.c index e5788dcf1b..543715df93 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -2865,7 +2865,8 @@ static void php_str_replace_in_subject(zval *search, zval *replace, zval **subje /* For each entry in the search array, get the entry */ while (zend_hash_get_current_data(Z_ARRVAL_P(search), (void **) &search_entry) == SUCCESS) { /* Make sure we're dealing with strings. */ - convert_to_string_ex(search_entry); + SEPARATE_ZVAL(search_entry); + convert_to_string(*search_entry); if (Z_STRLEN_PP(search_entry) == 0) { zend_hash_move_forward(Z_ARRVAL_P(search)); continue; |