Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/mail.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2021-04-19 14:44:29 +0300
committerChristoph Wurst <christoph@winzerhof-wurst.at>2021-04-19 14:44:29 +0300
commit2a9288488770dc7143951b5c8dcc53d3f96b1679 (patch)
treea093c55b3f5dafdb96227bd23183fe96174beba2 /lib/Migration
parentba398651d8c60a4a31149447d452e075cfd4850d (diff)
Exit early if no message ids are to be fixed
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/Migration')
-rw-r--r--lib/Migration/AddMissingMessageIds.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Migration/AddMissingMessageIds.php b/lib/Migration/AddMissingMessageIds.php
index 259ed78ad..9ce5d3b2c 100644
--- a/lib/Migration/AddMissingMessageIds.php
+++ b/lib/Migration/AddMissingMessageIds.php
@@ -51,7 +51,7 @@ class AddMissingMessageIds implements IRepairStep {
return 'Add a generated message-id to all Mail messages that have none';
}
- public function run(IOutput $output) {
+ public function run(IOutput $output): void {
$output->info('Looking up messages without a message-id');
/**
@@ -69,6 +69,9 @@ class AddMissingMessageIds implements IRepairStep {
}
$toFix = $this->mapper->findWithEmptyMessageId();
+ if (empty($toFix)) {
+ return;
+ }
$output->info(sprintf('%d messages need an update', count($toFix)));
$output->startProgress(count($toFix));
foreach ($toFix as $message) {