Skip to content

Commit 708ca08

Browse files
committed
Correct IntlDateFormatter::formatObject params
1 parent b8d0745 commit 708ca08

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

ext/intl/dateformat/dateformat.stub.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public function isLenient() {}
104104
public function format($datetime) {}
105105

106106
/**
107-
* @param IntlCalendar|DateTime $datetime
107+
* @param IntlCalendar|DateTimeInterface $datetime
108108
* @param array|int|string|null $format
109109
* @return string|false
110110
* @alias datefmt_format_object

ext/intl/dateformat/dateformat_format_object.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ U_CFUNC PHP_FUNCTION(datefmt_format_object)
190190
}
191191
} else {
192192
intl_error_set(NULL, status, "datefmt_format_object: the passed object "
193-
"must be an instance of either IntlCalendar or DateTime",
193+
"must be an instance of either IntlCalendar or DateTimeInterface",
194194
0);
195195
RETURN_FALSE;
196196
}

ext/intl/tests/dateformat_formatObject_error.phpt

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

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

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

0 commit comments

Comments
 (0)