Browse Source

When skipping blank searchvals we should advance the corresponding replace hash as well

PECL_4_3
Sara Golemon 23 years ago
parent
commit
4c52cf5f90
  1. 3
      ext/standard/string.c

3
ext/standard/string.c

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

Loading…
Cancel
Save