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

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Ng <chrng8@gmail.com>2022-07-05 20:00:27 +0300
committerbackportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com>2022-07-08 23:17:39 +0300
commite4674d5402e0f6fb8387c4796c10dce471aebb53 (patch)
tree6b75faf1247b0e602bab0c0b62865a69bd2d7ffd /apps/dav/lib
parentc01e5d53a1f28e2d0f6a552d470ed8b8e48797b5 (diff)
Fix empty address books being exportedbackport/33118/stable24
Signed-off-by: Christopher Ng <chrng8@gmail.com>
Diffstat (limited to 'apps/dav/lib')
-rw-r--r--apps/dav/lib/UserMigration/ContactsMigrator.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/dav/lib/UserMigration/ContactsMigrator.php b/apps/dav/lib/UserMigration/ContactsMigrator.php
index ae1a61ce4f4..d2ba82eb2e5 100644
--- a/apps/dav/lib/UserMigration/ContactsMigrator.php
+++ b/apps/dav/lib/UserMigration/ContactsMigrator.php
@@ -131,6 +131,10 @@ class ContactsMigrator implements IMigrator, ISizeEstimationMigrator {
}
}
+ if (count($vCards) === 0) {
+ throw new InvalidAddressBookException();
+ }
+
return [
'name' => $addressBookNode->getName(),
'displayName' => $addressBookInfo['{DAV:}displayname'],