Merge branch 'PHP-8.0' into PHP-8.1

* PHP-8.0:
  Fix default value of $flags in idn_to_ascii() and idn_to_utf8()
This commit is contained in:
Máté Kocsis 2021-09-04 17:57:23 +02:00
commit d670d9335c
No known key found for this signature in database
GPG Key ID: FD055E41728BF310
3 changed files with 5 additions and 5 deletions

View File

@ -175,7 +175,7 @@ static void php_intl_idn_to_46(INTERNAL_FUNCTION_PARAMETERS,
static void php_intl_idn_handoff(INTERNAL_FUNCTION_PARAMETERS, int mode)
{
zend_string *domain;
zend_long option = 0,
zend_long option = UIDNA_DEFAULT,
variant = INTL_IDN_VARIANT_UTS46;
zval *idna_info = NULL;

View File

@ -276,10 +276,10 @@ function grapheme_extract(string $haystack, int $size, int $type = GRAPHEME_EXTR
/* idn */
/** @param array $idna_info */
function idn_to_ascii(string $domain, int $flags = 0, int $variant = INTL_IDNA_VARIANT_UTS46, &$idna_info = null): string|false {}
function idn_to_ascii(string $domain, int $flags = IDNA_DEFAULT, int $variant = INTL_IDNA_VARIANT_UTS46, &$idna_info = null): string|false {}
/** @param array $idna_info */
function idn_to_utf8(string $domain, int $flags = 0, int $variant = INTL_IDNA_VARIANT_UTS46, &$idna_info = null): string|false {}
function idn_to_utf8(string $domain, int $flags = IDNA_DEFAULT, int $variant = INTL_IDNA_VARIANT_UTS46, &$idna_info = null): string|false {}
/* locale */

View File

@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: dd2cb2b1ffd2e72d24ff006b6f235e3cf501b0fb */
* Stub hash: dc9632b2417200deb39cc5cce25aa26a44128707 */
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_intlcal_create_instance, 0, 0, IntlCalendar, 1)
ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, timezone, "null")
@ -494,7 +494,7 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_idn_to_ascii, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, domain, IS_STRING, 0)
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "IDNA_DEFAULT")
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, variant, IS_LONG, 0, "INTL_IDNA_VARIANT_UTS46")
ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, idna_info, "null")
ZEND_END_ARG_INFO()