]> granicus.if.org Git - php/commitdiff
MFH(r1.358): Fixed a str_replace() bug similar to bug #22224
authorMoriyoshi Koizumi <moriyoshi@php.net>
Fri, 14 Feb 2003 19:00:43 +0000 (19:00 +0000)
committerMoriyoshi Koizumi <moriyoshi@php.net>
Fri, 14 Feb 2003 19:00:43 +0000 (19:00 +0000)
ext/standard/string.c

index 970114a49a66142bfbec17c67c08b0543ee792ea..75d773a32ad7e292ad7c5f3f13f8db35af8e9e79 100644 (file)
@@ -2621,7 +2621,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;