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
path: root/apps/dav
diff options
context:
space:
mode:
authorChristopher Ng <chrng8@gmail.com>2022-07-05 20:00:27 +0300
committerChristopher Ng <chrng8@gmail.com>2022-07-05 20:00:27 +0300
commit5f31d4b0bf1b9f45da580fc63d6112846097d4e6 (patch)
tree1698296909c52d571043d6daa2b83384c558f25d /apps/dav
parentde3504150c44af8b20bc7fad9810abc3be0b9839 (diff)
Fix empty address books being exportedfix/address-book-export
Signed-off-by: Christopher Ng <chrng8@gmail.com>
Diffstat (limited to 'apps/dav')
-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'],