diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2019-09-25 10:34:33 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-09-25 10:34:33 +0200 |
commit | a31256d52c24f9f8aa2eaf3fabac6a6fbd7216b2 (patch) | |
tree | 33e2cdf10a42e300b8da663b294ca6a23d1e38b7 | |
parent | 9cc1bf5628d3e5c4e97aeeadfe72fee5689599c8 (diff) | |
parent | 915fe2fdc6bd678c7bba33824622ae613f424329 (diff) | |
download | php-git-a31256d52c24f9f8aa2eaf3fabac6a6fbd7216b2.tar.gz |
Merge branch 'PHP-7.3' into PHP-7.4
-rw-r--r-- | ext/intl/msgformat/msgformat_helpers.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/intl/msgformat/msgformat_helpers.cpp b/ext/intl/msgformat/msgformat_helpers.cpp index ed75ae8bf6..11ff2f3388 100644 --- a/ext/intl/msgformat/msgformat_helpers.cpp +++ b/ext/intl/msgformat/msgformat_helpers.cpp @@ -179,10 +179,10 @@ static HashTable *umsg_parse_format(MessageFormatter_object *mfo, if (name_part.getType() == UMSGPAT_PART_TYPE_ARG_NAME) { UnicodeString argName = mp.getSubstring(name_part); - if ((storedType = (Formattable::Type*)zend_hash_str_find_ptr(ret, (char*)argName.getBuffer(), argName.length())) == NULL) { + if ((storedType = (Formattable::Type*)zend_hash_str_find_ptr(ret, (char*)argName.getBuffer(), argName.length() * sizeof(UChar))) == NULL) { /* not found already; create new entry in HT */ Formattable::Type bogusType = Formattable::kObject; - storedType = (Formattable::Type*)zend_hash_str_update_mem(ret, (char*)argName.getBuffer(), argName.length(), + storedType = (Formattable::Type*)zend_hash_str_update_mem(ret, (char*)argName.getBuffer(), argName.length() * sizeof(UChar), (void*)&bogusType, sizeof(bogusType)); } } else if (name_part.getType() == UMSGPAT_PART_TYPE_ARG_NUMBER) { @@ -427,7 +427,7 @@ U_CFUNC void umsg_format_helper(MessageFormatter_object *mfo, continue; } - storedArgType = (Formattable::Type*)zend_hash_str_find_ptr(types, (char*)key.getBuffer(), key.length()); + storedArgType = (Formattable::Type*)zend_hash_str_find_ptr(types, (char*)key.getBuffer(), key.length() * sizeof(UChar)); } if (storedArgType != NULL) { |