Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  Suppress deprecation warning on IDNA2003 ICU methods
This commit is contained in:
Sara Golemon 2019-08-16 12:41:02 -04:00
commit a192499d2a

View File

@ -229,11 +229,18 @@ static void php_intl_idn_to(INTERNAL_FUNCTION_PARAMETERS,
int32_t converted_ret_len;
status = U_ZERO_ERROR;
#if (ZEND_GCC_VERSION >= 4002) && !defined(__clang__)
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif
if (mode == INTL_IDN_TO_ASCII) {
converted_ret_len = uidna_IDNToASCII(ustring, ustring_len, converted, MAXPATHLEN, (int32_t)option, &parse_error, &status);
} else {
converted_ret_len = uidna_IDNToUnicode(ustring, ustring_len, converted, MAXPATHLEN, (int32_t)option, &parse_error, &status);
}
#if (ZEND_GCC_VERSION >= 4002) && !defined(__clang__)
# pragma GCC diagnostic pop
#endif
efree(ustring);
if (U_FAILURE(status)) {