Fix empty address books being exported

Signed-off-by: Christopher Ng <chrng8@gmail.com>
This commit is contained in:
Christopher Ng 2022-07-05 17:00:27 +00:00 committed by backportbot-nextcloud[bot]
parent c01e5d53a1
commit e4674d5402

View file

@ -131,6 +131,10 @@ class ContactsMigrator implements IMigrator, ISizeEstimationMigrator {
}
}
if (count($vCards) === 0) {
throw new InvalidAddressBookException();
}
return [
'name' => $addressBookNode->getName(),
'displayName' => $addressBookInfo['{DAV:}displayname'],