Skip to content

Commit 3f8d71d

Browse files
committed
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3: Fixed bug #79817
2 parents 99aa548 + a72c53a commit 3f8d71d

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
@@ -2598,7 +2598,7 @@ PHP_FUNCTION(substr_replace)
25982598

25992599
from_idx = len_idx = repl_idx = 0;
26002600

2601-
ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(str), num_index, str_index, tmp_str) {
2601+
ZEND_HASH_FOREACH_KEY_VAL_IND(Z_ARRVAL_P(str), num_index, str_index, tmp_str) {
26022602
zend_string *tmp_orig_str;
26032603
zend_string *orig_str = zval_get_tmp_string(tmp_str, &tmp_orig_str);
26042604

@@ -3046,7 +3046,7 @@ static void php_strtr_array(zval *return_value, zend_string *input, HashTable *p
30463046
zend_string *key_used;
30473047
/* we have to rebuild HashTable with numeric keys */
30483048
zend_hash_init(&str_hash, zend_hash_num_elements(pats), NULL, NULL, 0);
3049-
ZEND_HASH_FOREACH_KEY_VAL(pats, num_key, str_key, entry) {
3049+
ZEND_HASH_FOREACH_KEY_VAL_IND(pats, num_key, str_key, entry) {
30503050
if (UNEXPECTED(!str_key)) {
30513051
key_used = zend_long_to_str(num_key);
30523052
len = ZSTR_LEN(key_used);
@@ -3492,7 +3492,7 @@ PHP_FUNCTION(strtr)
34923492
zend_string *str_key, *tmp_str, *replace, *tmp_replace;
34933493
zval *entry;
34943494

3495-
ZEND_HASH_FOREACH_KEY_VAL(pats, num_key, str_key, entry) {
3495+
ZEND_HASH_FOREACH_KEY_VAL_IND(pats, num_key, str_key, entry) {
34963496
tmp_str = NULL;
34973497
if (UNEXPECTED(!str_key)) {
34983498
str_key = tmp_str = zend_long_to_str(num_key);
@@ -4391,7 +4391,7 @@ static zend_long php_str_replace_in_subject(zval *search, zval *replace, zval *s
43914391
}
43924392

43934393
/* For each entry in the search array, get the entry */
4394-
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(search), search_entry) {
4394+
ZEND_HASH_FOREACH_VAL_IND(Z_ARRVAL_P(search), search_entry) {
43954395
/* Make sure we're dealing with strings. */
43964396
zend_string *tmp_search_str;
43974397
zend_string *search_str = zval_get_tmp_string(search_entry, &tmp_search_str);
@@ -4555,7 +4555,7 @@ static void php_str_replace_common(INTERNAL_FUNCTION_PARAMETERS, int case_sensit
45554555

45564556
/* For each subject entry, convert it to string, then perform replacement
45574557
and add the result to the return_value array. */
4558-
ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(subject), num_key, string_key, subject_entry) {
4558+
ZEND_HASH_FOREACH_KEY_VAL_IND(Z_ARRVAL_P(subject), num_key, string_key, subject_entry) {
45594559
ZVAL_DEREF(subject_entry);
45604560
if (Z_TYPE_P(subject_entry) != IS_ARRAY && Z_TYPE_P(subject_entry) != IS_OBJECT) {
45614561
count += php_str_replace_in_subject(search, replace, subject_entry, &result, case_sensitivity);

0 commit comments

Comments
 (0)