Allow DateTimeImmutable in datefmt_format_object()

As pointed out in a comment on bug #65683.
This commit is contained in:
Nikita Popov 2019-03-18 11:39:16 +01:00
parent 4f03401628
commit 433758ceb3
2 changed files with 13 additions and 1 deletions

View file

@ -169,7 +169,7 @@ U_CFUNC PHP_FUNCTION(datefmt_format_object)
goto cleanup;
}
cal = obj_cal->clone();
} else if (instanceof_function(instance_ce, php_date_get_date_ce())) {
} else if (instanceof_function(instance_ce, php_date_get_interface_ce())) {
if (intl_datetime_decompose(object, &date, &timeZone, NULL,
"datefmt_format_object") == FAILURE) {
RETURN_FALSE;