summaryrefslogtreecommitdiff
path: root/ext/intl/common/common_date.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ext/intl/common/common_date.cpp')
-rw-r--r--ext/intl/common/common_date.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/intl/common/common_date.cpp b/ext/intl/common/common_date.cpp
index 2357a03940..51141c17c7 100644
--- a/ext/intl/common/common_date.cpp
+++ b/ext/intl/common/common_date.cpp
@@ -139,8 +139,8 @@ U_CFUNC int intl_datetime_decompose(zval *z, double *millis, TimeZone **tz,
php_date_obj *datetime;
datetime = Z_PHPDATE_P(z);
if (!datetime->time) {
- spprintf(&message, 0, "%s: the DateTime object is not properly "
- "initialized", func);
+ spprintf(&message, 0, "%s: the %s object is not properly "
+ "initialized", func, ZSTR_VAL(Z_OBJCE_P(z)->name));
intl_errors_set(err, U_ILLEGAL_ARGUMENT_ERROR,
message, 1);
efree(message);
@@ -199,7 +199,7 @@ U_CFUNC double intl_zval_to_millis(zval *z, intl_error *err, const char *func)
rv = U_MILLIS_PER_SECOND * Z_DVAL_P(z);
break;
case IS_OBJECT:
- if (instanceof_function(Z_OBJCE_P(z), php_date_get_date_ce())) {
+ if (instanceof_function(Z_OBJCE_P(z), php_date_get_interface_ce())) {
intl_datetime_decompose(z, &rv, NULL, err, func);
} else if (instanceof_function(Z_OBJCE_P(z), Calendar_ce_ptr)) {
Calendar_object *co = Z_INTL_CALENDAR_P(z);
@@ -222,7 +222,7 @@ U_CFUNC double intl_zval_to_millis(zval *z, intl_error *err, const char *func)
} else {
/* TODO: try with cast(), get() to obtain a number */
spprintf(&message, 0, "%s: invalid object type for date/time "
- "(only IntlCalendar and DateTime permitted)", func);
+ "(only IntlCalendar and DateTimeInterface permitted)", func);
intl_errors_set(err, U_ILLEGAL_ARGUMENT_ERROR,
message, 1);
efree(message);