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
parent de3504150c
commit 5f31d4b0bf

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'],