From ffa94dbe40273685b04091beb83bd0c055191a71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Fri, 14 Apr 2023 23:41:37 +0200 Subject: [PATCH] Fix: [msgraph calendar subscription] fix infinite iterating on calendar subscription When the total of user to subscribe is a multiple of offset, the subscription was an infinite loop --- .../Command/MapAndSubscribeUserCalendarCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Bundle/ChillCalendarBundle/Command/MapAndSubscribeUserCalendarCommand.php b/src/Bundle/ChillCalendarBundle/Command/MapAndSubscribeUserCalendarCommand.php index 902fe4c38..d0fdd0a02 100644 --- a/src/Bundle/ChillCalendarBundle/Command/MapAndSubscribeUserCalendarCommand.php +++ b/src/Bundle/ChillCalendarBundle/Command/MapAndSubscribeUserCalendarCommand.php @@ -76,7 +76,7 @@ class MapAndSubscribeUserCalendarCommand extends Command 'expiration' => $expiration->format(DateTimeImmutable::ATOM), ]); - while ($offset < ($total - 1)) { + while ($offset < $total) { $users = $this->userRepository->findByMostOldSubscriptionOrWithoutSubscriptionOrData( $interval, $limit,