From 4c52cf5f909cdce14173c56995187b60fd5dc15d Mon Sep 17 00:00:00 2001 From: Sara Golemon Date: Fri, 20 Jun 2003 15:41:43 +0000 Subject: [PATCH] When skipping blank searchvals we should advance the corresponding replace hash as well --- ext/standard/string.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ext/standard/string.c b/ext/standard/string.c index bfbd9d9f9d5..46194042c9e 100644 --- a/ext/standard/string.c +++ b/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; }