Skip to content

Commit

Permalink
Merge pull request #33178 from nextcloud/backport/33118/stable24
Browse files Browse the repository at this point in the history
[stable24] Fix empty address books being exported
  • Loading branch information
blizzz authored Jul 22, 2022
2 parents f23472e + e4674d5 commit f3afffe
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions apps/dav/lib/UserMigration/ContactsMigrator.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ private function getAddressBookExportData(IUser $user, array $addressBookInfo, O
}
}

if (count($vCards) === 0) {
throw new InvalidAddressBookException();
}

return [
'name' => $addressBookNode->getName(),
'displayName' => $addressBookInfo['{DAV:}displayname'],
Expand Down

0 comments on commit f3afffe

Please sign in to comment.