mirror of
https://github.com/nextcloud/server.git
synced 2026-03-24 19:33:49 -04:00
Don't include shared addressbook if source not found
This commit is contained in:
parent
d02b0e39b2
commit
f4285a25ef
1 changed files with 4 additions and 2 deletions
|
|
@ -69,8 +69,10 @@ class OC_Share_Backend_Addressbook implements OCP\Share_Backend_Collection {
|
|||
$addressbooks = array();
|
||||
foreach ($items as $item) {
|
||||
$addressbook = OC_Contacts_Addressbook::find($item['item_source']);
|
||||
$addressbook['displayname'] = $item['item_target'];
|
||||
$addressbooks[] = $addressbook;
|
||||
if ($addressbook) {
|
||||
$addressbook['displayname'] = $item['item_target'];
|
||||
$addressbooks[] = $addressbook;
|
||||
}
|
||||
}
|
||||
return $addressbooks;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue