diff options
-rw-r--r-- | apps/dav/lib/CalDAV/CalDavBackend.php | 13 | ||||
-rw-r--r-- | lib/public/Util.php | 2 |
2 files changed, 3 insertions, 12 deletions
diff --git a/apps/dav/lib/CalDAV/CalDavBackend.php b/apps/dav/lib/CalDAV/CalDavBackend.php index f5c929e18f8..51eb505124e 100644 --- a/apps/dav/lib/CalDAV/CalDavBackend.php +++ b/apps/dav/lib/CalDAV/CalDavBackend.php @@ -1633,19 +1633,10 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription } if ($timeRange && $timeRange['start']) { - try { - $query->andWhere($query->expr()->gt('lastoccurence', $query->createNamedParameter($timeRange['start']->getTimeStamp()))); - } catch (\ValueError) { - /* Will happen for dates too far in the future on 32bit, return no results */ - return []; - } + $query->andWhere($query->expr()->gt('lastoccurence', $query->createNamedParameter($timeRange['start']->getTimeStamp()))); } if ($timeRange && $timeRange['end']) { - try { - $query->andWhere($query->expr()->lt('firstoccurence', $query->createNamedParameter($timeRange['end']->getTimeStamp()))); - } catch (\ValueError) { - /* Will happen for dates too far in the future on 32bit, ignore the limit in this case */ - } + $query->andWhere($query->expr()->lt('firstoccurence', $query->createNamedParameter($timeRange['end']->getTimeStamp()))); } $stmt = $query->executeQuery(); diff --git a/lib/public/Util.php b/lib/public/Util.php index 159e5d5585a..69eccbbc5f6 100644 --- a/lib/public/Util.php +++ b/lib/public/Util.php @@ -347,7 +347,7 @@ class Util { */ public static function numericToNumber(string|float|int $number): int|float { /* This is a hack to cast to (int|float) */ - return 0 + $number; + return 0 + (string)$number; } /** |