Skip to content

Commit a192499

Browse files
committed
Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2: Suppress deprecation warning on IDNA2003 ICU methods
2 parents 9b9814f + 725f439 commit a192499

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

ext/intl/idn/idn.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,11 +229,18 @@ static void php_intl_idn_to(INTERNAL_FUNCTION_PARAMETERS,
229229
int32_t converted_ret_len;
230230

231231
status = U_ZERO_ERROR;
232+
#if (ZEND_GCC_VERSION >= 4002) && !defined(__clang__)
233+
# pragma GCC diagnostic push
234+
# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
235+
#endif
232236
if (mode == INTL_IDN_TO_ASCII) {
233237
converted_ret_len = uidna_IDNToASCII(ustring, ustring_len, converted, MAXPATHLEN, (int32_t)option, &parse_error, &status);
234238
} else {
235239
converted_ret_len = uidna_IDNToUnicode(ustring, ustring_len, converted, MAXPATHLEN, (int32_t)option, &parse_error, &status);
236240
}
241+
#if (ZEND_GCC_VERSION >= 4002) && !defined(__clang__)
242+
# pragma GCC diagnostic pop
243+
#endif
237244
efree(ustring);
238245

239246
if (U_FAILURE(status)) {

0 commit comments

Comments
 (0)