summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorChristopher Ng <chrng8@gmail.com>2022-07-05 17:00:27 +0000
committerChristopher Ng <chrng8@gmail.com>2022-07-05 17:00:27 +0000
commit5f31d4b0bf1b9f45da580fc63d6112846097d4e6 (patch)
tree1698296909c52d571043d6daa2b83384c558f25d /apps
parentde3504150c44af8b20bc7fad9810abc3be0b9839 (diff)
downloadnextcloud-server-5f31d4b0bf1b9f45da580fc63d6112846097d4e6.tar.gz
nextcloud-server-5f31d4b0bf1b9f45da580fc63d6112846097d4e6.zip
Fix empty address books being exported
Signed-off-by: Christopher Ng <chrng8@gmail.com>
Diffstat (limited to 'apps')
-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'],