From c4d90f3e810bfc35756447e44aa9479d036779ac Mon Sep 17 00:00:00 2001 From: Côme Chilliet Date: Thu, 2 Feb 2023 11:30:49 +0100 Subject: Removed catch of ValueError as we cannot know if it’s >2038 or <1970 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also fixed numericToString to correctly convert float to int if it fits Signed-off-by: Côme Chilliet --- apps/dav/lib/CalDAV/CalDavBackend.php | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'apps') 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(); -- cgit v1.2.3