diff options
-rw-r--r-- | apps/dav/lib/Migration/RemoveDeletedUsersCalendarSubscriptions.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/apps/dav/lib/Migration/RemoveDeletedUsersCalendarSubscriptions.php b/apps/dav/lib/Migration/RemoveDeletedUsersCalendarSubscriptions.php index 50becf81e78..38d395b2c81 100644 --- a/apps/dav/lib/Migration/RemoveDeletedUsersCalendarSubscriptions.php +++ b/apps/dav/lib/Migration/RemoveDeletedUsersCalendarSubscriptions.php @@ -41,7 +41,8 @@ class RemoveDeletedUsersCalendarSubscriptions implements IRepairStep { /** @var int */ private $progress = 0; - private $orphanSubscriptions = []; + /** @var int[] */ + private $orphanSubscriptionIds = []; private const SUBSCRIPTIONS_CHUNK_SIZE = 1000; @@ -74,7 +75,7 @@ class RemoveDeletedUsersCalendarSubscriptions implements IRepairStep { $output->finishProgress(); $this->deleteOrphanSubscriptions(); - $output->info(sprintf('%d calendar subscriptions without an user have been cleaned up', count($this->orphanSubscriptions))); + $output->info(sprintf('%d calendar subscriptions without an user have been cleaned up', count($this->orphanSubscriptionIds))); } /** @@ -112,7 +113,7 @@ class RemoveDeletedUsersCalendarSubscriptions implements IRepairStep { while ($row = $result->fetch()) { $username = $this->getPrincipal($row['principaluri']); if (!$this->userManager->userExists($username)) { - $this->orphanSubscriptions[] = $row['id']; + $this->orphanSubscriptionIds[] = (int) $row['id']; } } $result->closeCursor(); @@ -122,7 +123,7 @@ class RemoveDeletedUsersCalendarSubscriptions implements IRepairStep { * @throws Exception */ private function deleteOrphanSubscriptions(): void { - foreach ($this->orphanSubscriptions as $orphanSubscriptionID) { + foreach ($this->orphanSubscriptionIds as $orphanSubscriptionID) { $this->deleteOrphanSubscription($orphanSubscriptionID); } } |