Skip to content

Commit 12214e1

Browse files
committed
Merge branch 'PHP-7.4'
* PHP-7.4: Fixed bug #79817
2 parents 9a5695b + 3f8d71d commit 12214e1

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

ext/standard/string.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2364,7 +2364,7 @@ PHP_FUNCTION(substr_replace)
23642364

23652365
from_idx = len_idx = repl_idx = 0;
23662366

2367-
ZEND_HASH_FOREACH_KEY_VAL(str_ht, num_index, str_index, tmp_str) {
2367+
ZEND_HASH_FOREACH_KEY_VAL_IND(str_ht, num_index, str_index, tmp_str) {
23682368
zend_string *tmp_orig_str;
23692369
zend_string *orig_str = zval_get_tmp_string(tmp_str, &tmp_orig_str);
23702370

@@ -2804,7 +2804,7 @@ static void php_strtr_array(zval *return_value, zend_string *input, HashTable *p
28042804
zend_string *key_used;
28052805
/* we have to rebuild HashTable with numeric keys */
28062806
zend_hash_init(&str_hash, zend_hash_num_elements(pats), NULL, NULL, 0);
2807-
ZEND_HASH_FOREACH_KEY_VAL(pats, num_key, str_key, entry) {
2807+
ZEND_HASH_FOREACH_KEY_VAL_IND(pats, num_key, str_key, entry) {
28082808
if (UNEXPECTED(!str_key)) {
28092809
key_used = zend_long_to_str(num_key);
28102810
len = ZSTR_LEN(key_used);
@@ -3238,7 +3238,7 @@ PHP_FUNCTION(strtr)
32383238
zend_string *str_key, *tmp_str, *replace, *tmp_replace;
32393239
zval *entry;
32403240

3241-
ZEND_HASH_FOREACH_KEY_VAL(from_ht, num_key, str_key, entry) {
3241+
ZEND_HASH_FOREACH_KEY_VAL_IND(from_ht, num_key, str_key, entry) {
32423242
tmp_str = NULL;
32433243
if (UNEXPECTED(!str_key)) {
32443244
str_key = tmp_str = zend_long_to_str(num_key);
@@ -4119,7 +4119,7 @@ static zend_long php_str_replace_in_subject(zval *search, zval *replace, zend_st
41194119
}
41204120

41214121
/* For each entry in the search array, get the entry */
4122-
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(search), search_entry) {
4122+
ZEND_HASH_FOREACH_VAL_IND(Z_ARRVAL_P(search), search_entry) {
41234123
/* Make sure we're dealing with strings. */
41244124
zend_string *tmp_search_str;
41254125
zend_string *search_str = zval_get_tmp_string(search_entry, &tmp_search_str);
@@ -4282,7 +4282,7 @@ static void php_str_replace_common(INTERNAL_FUNCTION_PARAMETERS, int case_sensit
42824282

42834283
/* For each subject entry, convert it to string, then perform replacement
42844284
and add the result to the return_value array. */
4285-
ZEND_HASH_FOREACH_KEY_VAL(subject_ht, num_key, string_key, subject_entry) {
4285+
ZEND_HASH_FOREACH_KEY_VAL_IND(subject_ht, num_key, string_key, subject_entry) {
42864286
zend_string *tmp_subject_str;
42874287
ZVAL_DEREF(subject_entry);
42884288
subject_str = zval_get_tmp_string(subject_entry, &tmp_subject_str);

0 commit comments

Comments
 (0)