From ee153deb1fc91cecb2095ada9bd12683ca801852 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Sat, 1 Jun 2019 02:18:56 +0200 Subject: [PATCH] Change ZPP only if compiled with ICU >= 64 --- ext/intl/locale/locale_methods.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ext/intl/locale/locale_methods.c b/ext/intl/locale/locale_methods.c index 7356132b05..768ae84d2c 100644 --- a/ext/intl/locale/locale_methods.c +++ b/ext/intl/locale/locale_methods.c @@ -1554,11 +1554,17 @@ PHP_FUNCTION(locale_lookup) intl_error_reset( NULL ); - if(zend_parse_parameters( ZEND_NUM_ARGS(), "as|bS!", &arr, &loc_range, &loc_range_len, +#if U_ICU_VERSION_MAJOR_NUM > 63 +# define BANG "!" +#else +# define BANG +#endif + if(zend_parse_parameters( ZEND_NUM_ARGS(), "as|bS" BANG, &arr, &loc_range, &loc_range_len, &boolCanonical, &fallback_loc_str) == FAILURE) { intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, "locale_lookup: unable to parse input params", 0 ); RETURN_FALSE; } +#undef BANG if(loc_range_len == 0) { if(fallback_loc_str) { -- 2.40.0