]> granicus.if.org Git - php/commitdiff
When skipping blank searchvals we should advance the corresponding replace hash as...
authorSara Golemon <pollita@php.net>
Fri, 20 Jun 2003 15:41:43 +0000 (15:41 +0000)
committerSara Golemon <pollita@php.net>
Fri, 20 Jun 2003 15:41:43 +0000 (15:41 +0000)
ext/standard/string.c

index bfbd9d9f9d5af2a040938688b05e734755091de0..46194042c9ebd13eba9bc94d1d5d7f91d7e97f6c 100644 (file)
@@ -3063,6 +3063,9 @@ static void php_str_replace_in_subject(zval *search, zval *replace, zval **subje
                        convert_to_string(*search_entry);
                        if (Z_STRLEN_PP(search_entry) == 0) {
                                zend_hash_move_forward(Z_ARRVAL_P(search));
+                               if (Z_TYPE_P(replace) == IS_ARRAY) {
+                                       zend_hash_move_forward(Z_ARRVAL_P(replace));
+                               }
                                continue;
                        }