Skip to content

Commit 41ee889

Browse files
committed
Correct IntlDateFormatter::formatObject params
1 parent b8d0745 commit 41ee889

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
@@ -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_arginfo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: faeef90c9c1324c6a25f0df36c7239ddc2b43ee4 */
2+
* Stub hash: 425a285b704e175ccd0313fe1be85c8abaf820b7 */
33

44
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlDateFormatter___construct, 0, 0, 3)
55
ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 1)

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)