Skip to content

Commit 6e2e6e2

Browse files
committed
Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4: ext/intl: use PATTERN constant name in dateformat errors
2 parents 7959359 + 2d78489 commit 6e2e6e2

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

ext/intl/dateformat/dateformat_create.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ static zend_result datefmt_ctor(INTERNAL_FUNCTION_PARAMETERS)
9999
return FAILURE;
100100
}
101101
if (date_type == UDAT_PATTERN && time_type != UDAT_PATTERN) {
102-
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, "time format must be UDAT_PATTERN if date format is UDAT_PATTERN");
102+
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, "datefmt_create: time format must be IntlDateFormatter::PATTERN if date format is IntlDateFormatter::PATTERN", 0);
103103
return FAILURE;
104104
}
105105

ext/intl/tests/gh12243.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
--TEST--
2-
GitHub #12043 segfault with IntlDateFormatter::dateType where it equals to UDAT_PATTERN (icu 50) but
2+
GitHub #12043 segfault with IntlDateFormatter::dateType where it equals to IntlDateFormatter::PATTERN (icu 50) but
33
IntldateFormatter::timeType needs to be set as such.
44
--EXTENSIONS--
55
intl
@@ -21,4 +21,4 @@ try {
2121

2222
?>
2323
--EXPECT--
24-
IntlDateFormatter::__construct(): time format must be UDAT_PATTERN if date format is UDAT_PATTERN
24+
IntlDateFormatter::__construct(): time format must be IntlDateFormatter::PATTERN if date format is IntlDateFormatter::PATTERN: U_ILLEGAL_ARGUMENT_ERROR

0 commit comments

Comments
 (0)