Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ PHP NEWS
and IntlGregorianCalendar date/time construction. (Weilin Du)
. Expose Spoofchecker restriction-level APIs on all supported ICU
versions. (Weilin Du)
. Fix SpoofChecker::setAllowedChars() to report PHP constant names
instead of ICU USET_* names in invalid pattern option errors.
. Fix SpoofChecker::setAllowedChars() and IntlDateFormatter::__construct()
to report PHP constant names instead of ICU constant names in
user-visible error messages.
(Weilin Du)

- MySQLnd:
Expand Down
5 changes: 3 additions & 2 deletions UPGRADING
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,9 @@ PHP 8.4 UPGRADE NOTES
- ValueError if the integer index does not fit in a signed 32 bit integer
. IntlDateFormatter::__construct() throws a ValueError if the locale is invalid.
. NumberFormatter::__construct() throws a ValueError if the locale is invalid.
. SpoofChecker::setAllowedChars() now reports PHP constant names instead
of ICU USET_* names in invalid pattern option errors.
. SpoofChecker::setAllowedChars() and IntlDateFormatter::__construct()
now report PHP constant names instead of ICU constant names in
user-visible error messages.
. MBString:
. mb_encode_numericentity() and mb_decode_numericentity() now check that
the $map is only composed of integers, if not a ValueError is thrown.
Expand Down
2 changes: 1 addition & 1 deletion ext/intl/dateformat/dateformat_create.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ static zend_result datefmt_ctor(INTERNAL_FUNCTION_PARAMETERS, zend_error_handlin
return FAILURE;
}
if (date_type == UDAT_PATTERN && time_type != UDAT_PATTERN) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, "datefmt_create: time format must be UDAT_PATTERN if date format is UDAT_PATTERN", 0);
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, "datefmt_create: time format must be IntlDateFormatter::PATTERN if date format is IntlDateFormatter::PATTERN", 0);
return FAILURE;
}

Expand Down
4 changes: 2 additions & 2 deletions ext/intl/tests/gh12243.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--TEST--
GitHub #12043 segfault with IntlDateFormatter::dateType where it equals to UDAT_PATTERN (icu 50) but
GitHub #12043 segfault with IntlDateFormatter::dateType where it equals to IntlDateFormatter::PATTERN (icu 50) but
IntldateFormatter::timeType needs to be set as such.
--EXTENSIONS--
intl
Expand All @@ -21,4 +21,4 @@ try {

?>
--EXPECT--
datefmt_create: time format must be UDAT_PATTERN if date format is UDAT_PATTERN: U_ILLEGAL_ARGUMENT_ERROR
datefmt_create: time format must be IntlDateFormatter::PATTERN if date format is IntlDateFormatter::PATTERN: U_ILLEGAL_ARGUMENT_ERROR
Loading