summaryrefslogtreecommitdiff
path: root/ext/date/php_date.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/date/php_date.c')
-rw-r--r--ext/date/php_date.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/date/php_date.c b/ext/date/php_date.c
index 00d7892a6a..ed24895965 100644
--- a/ext/date/php_date.c
+++ b/ext/date/php_date.c
@@ -1903,7 +1903,7 @@ static int date_object_compare_date(zval *d1, zval *d2) /* {{{ */
if (!o1->time || !o2->time) {
php_error_docref(NULL, E_WARNING, "Trying to compare an incomplete DateTime or DateTimeImmutable object");
- return 1;
+ return ZEND_UNCOMPARABLE;
}
if (!o1->time->sse_uptodate) {
timelib_update_ts(o1->time, o1->time->tz_info);
@@ -2040,7 +2040,7 @@ static int date_object_compare_timezone(zval *tz1, zval *tz2) /* {{{ */
if (o1->type != o2->type) {
php_error_docref(NULL, E_WARNING, "Trying to compare different kinds of DateTimeZone objects");
- return 1;
+ return ZEND_UNCOMPARABLE;
}
switch (o1->type) {
@@ -3901,7 +3901,7 @@ static int date_interval_compare_objects(zval *o1, zval *o2) {
* smaller, equal or greater depending on the point in time at which the interval starts. As
* such, we treat DateInterval objects are non-comparable and emit a warning. */
zend_error(E_WARNING, "Cannot compare DateInterval objects");
- return 1;
+ return ZEND_UNCOMPARABLE;
}
/* {{{ date_interval_read_property */