summaryrefslogtreecommitdiff
path: root/ext/intl/msgformat/msgformat_helpers.cpp
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2018-10-05 22:52:53 +0200
committerAnatol Belski <ab@php.net>2018-10-05 22:52:53 +0200
commita7754286d20fd68310aa4532a005fc2b71519591 (patch)
tree8c94eaf549124c67f7804d2f72d9dd75c2764f78 /ext/intl/msgformat/msgformat_helpers.cpp
parentfde2ae3721b7e2b97a382347c06b307c6ad8874c (diff)
parentc2a956de6fa815d68876e036ad48e5057b2c6931 (diff)
downloadphp-git-a7754286d20fd68310aa4532a005fc2b71519591.tar.gz
Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1: Add test for bug #76942 Fixed Bug #76942 U_ARGUMENT_TYPE_MISMATCH
Diffstat (limited to 'ext/intl/msgformat/msgformat_helpers.cpp')
-rw-r--r--ext/intl/msgformat/msgformat_helpers.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/intl/msgformat/msgformat_helpers.cpp b/ext/intl/msgformat/msgformat_helpers.cpp
index 29956c7ee0..25fa3e5e1f 100644
--- a/ext/intl/msgformat/msgformat_helpers.cpp
+++ b/ext/intl/msgformat/msgformat_helpers.cpp
@@ -46,6 +46,7 @@ extern "C" {
#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 48
#define HAS_MESSAGE_PATTERN 1
+#define HAS_MISALLOCATE_MEMORY_BUG 1
#endif
U_NAMESPACE_BEGIN
@@ -334,6 +335,7 @@ static void umsg_set_timezone(MessageFormatter_object *mfo,
return; /* already done */
}
+#ifdef HAS_MISALLOCATE_MEMORY_BUG
/* There is a bug in ICU which prevents MessageFormatter::getFormats()
to handle more than 10 formats correctly. The enumerator could be
used to walk through the present formatters using getFormat(), which
@@ -351,6 +353,7 @@ static void umsg_set_timezone(MessageFormatter_object *mfo,
if (count > 10) {
return;
}
+#endif
formats = mf->getFormats(count);