Skip to content

Commit ac9cbb7

Browse files
committed
Merge branch 'PHP-8.1'
* PHP-8.1: Correct IntlDateFormatter::formatObject params
2 parents fa83e37 + 306da80 commit ac9cbb7

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

ext/intl/dateformat/dateformat.stub.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ public function isLenient(): bool {}
176176
public function format($datetime): string|false {}
177177

178178
/**
179-
* @param IntlCalendar|DateTime $datetime
179+
* @param IntlCalendar|DateTimeInterface $datetime
180180
* @param array|int|string|null $format
181181
* @tentative-return-type
182182
* @alias datefmt_format_object

ext/intl/dateformat/dateformat_arginfo.h

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ext/intl/dateformat/dateformat_format_object.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ U_CFUNC PHP_FUNCTION(datefmt_format_object)
181181
}
182182
} else {
183183
intl_error_set(NULL, status, "datefmt_format_object: the passed object "
184-
"must be an instance of either IntlCalendar or DateTime",
184+
"must be an instance of either IntlCalendar or DateTimeInterface",
185185
0);
186186
RETURN_FALSE;
187187
}

ext/intl/tests/dateformat_formatObject_error.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ var_dump(IntlDateFormatter::formatObject($cal, ""));
2929

3030
?>
3131
--EXPECTF--
32-
Warning: IntlDateFormatter::formatObject(): datefmt_format_object: the passed object must be an instance of either IntlCalendar or DateTime in %s on line %d
32+
Warning: IntlDateFormatter::formatObject(): datefmt_format_object: the passed object must be an instance of either IntlCalendar or DateTimeInterface in %s on line %d
3333
bool(false)
3434

3535
Warning: IntlDateFormatter::formatObject(): datefmt_format_object: bad IntlCalendar instance: not initialized properly in %s on line %d

0 commit comments

Comments
 (0)