Skip to content

Commit d670d93

Browse files
committed
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()
2 parents a6d50d2 + d5aed7b commit d670d93

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

ext/intl/idn/idn.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ static void php_intl_idn_to_46(INTERNAL_FUNCTION_PARAMETERS,
175175
static void php_intl_idn_handoff(INTERNAL_FUNCTION_PARAMETERS, int mode)
176176
{
177177
zend_string *domain;
178-
zend_long option = 0,
178+
zend_long option = UIDNA_DEFAULT,
179179
variant = INTL_IDN_VARIANT_UTS46;
180180
zval *idna_info = NULL;
181181

ext/intl/php_intl.stub.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,10 +276,10 @@ function grapheme_extract(string $haystack, int $size, int $type = GRAPHEME_EXTR
276276
/* idn */
277277

278278
/** @param array $idna_info */
279-
function idn_to_ascii(string $domain, int $flags = 0, int $variant = INTL_IDNA_VARIANT_UTS46, &$idna_info = null): string|false {}
279+
function idn_to_ascii(string $domain, int $flags = IDNA_DEFAULT, int $variant = INTL_IDNA_VARIANT_UTS46, &$idna_info = null): string|false {}
280280

281281
/** @param array $idna_info */
282-
function idn_to_utf8(string $domain, int $flags = 0, int $variant = INTL_IDNA_VARIANT_UTS46, &$idna_info = null): string|false {}
282+
function idn_to_utf8(string $domain, int $flags = IDNA_DEFAULT, int $variant = INTL_IDNA_VARIANT_UTS46, &$idna_info = null): string|false {}
283283

284284
/* locale */
285285

ext/intl/php_intl_arginfo.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: dd2cb2b1ffd2e72d24ff006b6f235e3cf501b0fb */
2+
* Stub hash: dc9632b2417200deb39cc5cce25aa26a44128707 */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_intlcal_create_instance, 0, 0, IntlCalendar, 1)
55
ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, timezone, "null")
@@ -494,7 +494,7 @@ ZEND_END_ARG_INFO()
494494

495495
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_idn_to_ascii, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
496496
ZEND_ARG_TYPE_INFO(0, domain, IS_STRING, 0)
497-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
497+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "IDNA_DEFAULT")
498498
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, variant, IS_LONG, 0, "INTL_IDNA_VARIANT_UTS46")
499499
ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, idna_info, "null")
500500
ZEND_END_ARG_INFO()

0 commit comments

Comments
 (0)