Skip to content

Commit a31256d

Browse files
committed
Merge branch 'PHP-7.3' into PHP-7.4
2 parents 9cc1bf5 + 915fe2f commit a31256d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ext/intl/msgformat/msgformat_helpers.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,10 @@ static HashTable *umsg_parse_format(MessageFormatter_object *mfo,
179179

180180
if (name_part.getType() == UMSGPAT_PART_TYPE_ARG_NAME) {
181181
UnicodeString argName = mp.getSubstring(name_part);
182-
if ((storedType = (Formattable::Type*)zend_hash_str_find_ptr(ret, (char*)argName.getBuffer(), argName.length())) == NULL) {
182+
if ((storedType = (Formattable::Type*)zend_hash_str_find_ptr(ret, (char*)argName.getBuffer(), argName.length() * sizeof(UChar))) == NULL) {
183183
/* not found already; create new entry in HT */
184184
Formattable::Type bogusType = Formattable::kObject;
185-
storedType = (Formattable::Type*)zend_hash_str_update_mem(ret, (char*)argName.getBuffer(), argName.length(),
185+
storedType = (Formattable::Type*)zend_hash_str_update_mem(ret, (char*)argName.getBuffer(), argName.length() * sizeof(UChar),
186186
(void*)&bogusType, sizeof(bogusType));
187187
}
188188
} else if (name_part.getType() == UMSGPAT_PART_TYPE_ARG_NUMBER) {
@@ -427,7 +427,7 @@ U_CFUNC void umsg_format_helper(MessageFormatter_object *mfo,
427427
continue;
428428
}
429429

430-
storedArgType = (Formattable::Type*)zend_hash_str_find_ptr(types, (char*)key.getBuffer(), key.length());
430+
storedArgType = (Formattable::Type*)zend_hash_str_find_ptr(types, (char*)key.getBuffer(), key.length() * sizeof(UChar));
431431
}
432432

433433
if (storedArgType != NULL) {

0 commit comments

Comments
 (0)