Skip to content

Commit 3ad5121

Browse files
committed
mb_trim_default_chars set to zend_hash_index_add_new
1 parent f3b2330 commit 3ad5121

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/mbstring/mbstring.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3006,7 +3006,7 @@ static zend_string* mb_trim_default_chars(zend_string *str, mb_trim_mode mode, c
30063006
zend_hash_init(&what_ht, trim_default_chars_length, NULL, NULL, false);
30073007

30083008
for (size_t i = 0; i < trim_default_chars_length; i++) {
3009-
zend_hash_index_add(&what_ht, trim_default_chars[i], &val);
3009+
zend_hash_index_add_new(&what_ht, trim_default_chars[i], &val);
30103010
}
30113011
zend_string* retval = trim_each_wchar(str, &what_ht, mode, enc);
30123012
zend_hash_destroy(&what_ht);

0 commit comments

Comments
 (0)