Skip to content

Commit ee47731

Browse files
committed
ext/intl: Fix various error messages
1 parent d37a820 commit ee47731

5 files changed

Lines changed: 9 additions & 5 deletions

File tree

NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ PHP NEWS
1111
. Fixed GMP integer string parsing to reject strings containing NUL bytes
1212
instead of silently truncating them. (Weilin Du)
1313

14+
- Intl:
15+
. Fixed grammatical issues in Normalizer invalid form and IntlCalendar time
16+
zone offset error messages. (Weilin Du)
17+
1418
- ODBC:
1519
. Fixed bug GH-22668 (Heap buffer over-read when a column value exceeds the
1620
driver-reported display size). (iliaal)

ext/intl/common/common_date.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ U_CFUNC TimeZone *timezone_convert_datetimezone(
5757

5858
if (UNEXPECTED(offset_mins <= -24 * 60 || offset_mins >= 24 * 60)) {
5959
intl_errors_set(outside_error, U_ILLEGAL_ARGUMENT_ERROR,
60-
"object has an time zone offset that's too large");
60+
"object has a time zone offset that is too large");
6161
return NULL;
6262
}
6363

ext/intl/normalizer/normalizer_normalize.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ U_CFUNC PHP_FUNCTION( normalizer_normalize )
115115
case NORMALIZER_FORM_KC_CF:
116116
break;
117117
default:
118-
zend_argument_value_error(2, "must be a a valid normalization form");
118+
zend_argument_value_error(2, "must be a valid normalization form");
119119
RETURN_THROWS();
120120
}
121121

@@ -232,7 +232,7 @@ U_CFUNC PHP_FUNCTION( normalizer_is_normalized )
232232
case NORMALIZER_FORM_KC_CF:
233233
break;
234234
default:
235-
zend_argument_value_error(2, "must be a a valid normalization form");
235+
zend_argument_value_error(2, "must be a valid normalization form");
236236
RETURN_THROWS();
237237
}
238238

ext/intl/tests/calendar_fromDateTime_error.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,6 @@ DateMalformedStringException: Failed to parse time string (foobar) at position 0
3535
NULL
3636
string(88) "IntlCalendar::fromDateTime(): DateTime object is unconstructed: U_ILLEGAL_ARGUMENT_ERROR"
3737
NULL
38-
string(103) "IntlCalendar::fromDateTime(): object has an time zone offset that's too large: U_ILLEGAL_ARGUMENT_ERROR"
38+
string(103) "IntlCalendar::fromDateTime(): object has a time zone offset that is too large: U_ILLEGAL_ARGUMENT_ERROR"
3939
NULL
4040
string(127) "IntlCalendar::fromDateTime(): time zone id 'WEST' extracted from ext/date DateTimeZone not recognized: U_ILLEGAL_ARGUMENT_ERROR"

ext/intl/tests/calendar_setTimeZone_error2.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@ bool(false)
2525
string(126) "IntlCalendar::setTimeZone(): time zone id 'WEST' extracted from ext/date DateTimeZone not recognized: U_ILLEGAL_ARGUMENT_ERROR"
2626
string(16) "Europe/Amsterdam"
2727
bool(false)
28-
string(102) "IntlCalendar::setTimeZone(): object has an time zone offset that's too large: U_ILLEGAL_ARGUMENT_ERROR"
28+
string(102) "IntlCalendar::setTimeZone(): object has a time zone offset that is too large: U_ILLEGAL_ARGUMENT_ERROR"
2929
string(16) "Europe/Amsterdam"

0 commit comments

Comments
 (0)