Skip to content

Commit bd62f5a

Browse files
committed
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3: Suppress deprecation warning on IDNA2003 ICU methods
2 parents 4d3be2a + a192499 commit bd62f5a

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
@@ -203,11 +203,18 @@ static void php_intl_idn_to(INTERNAL_FUNCTION_PARAMETERS,
203203
int32_t converted_ret_len;
204204

205205
status = U_ZERO_ERROR;
206+
#if (ZEND_GCC_VERSION >= 4002) && !defined(__clang__)
207+
# pragma GCC diagnostic push
208+
# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
209+
#endif
206210
if (mode == INTL_IDN_TO_ASCII) {
207211
converted_ret_len = uidna_IDNToASCII(ustring, ustring_len, converted, MAXPATHLEN, (int32_t)option, &parse_error, &status);
208212
} else {
209213
converted_ret_len = uidna_IDNToUnicode(ustring, ustring_len, converted, MAXPATHLEN, (int32_t)option, &parse_error, &status);
210214
}
215+
#if (ZEND_GCC_VERSION >= 4002) && !defined(__clang__)
216+
# pragma GCC diagnostic pop
217+
#endif
211218
efree(ustring);
212219

213220
if (U_FAILURE(status)) {

0 commit comments

Comments
 (0)