summaryrefslogtreecommitdiffstats
path: root/apps/contacts/lib
diff options
context:
space:
mode:
authorMichael Gapczynski <mtgap@owncloud.com>2012-08-08 19:12:59 -0400
committerMichael Gapczynski <mtgap@owncloud.com>2012-08-08 19:12:59 -0400
commitf4285a25ef5e41ab02c8d34f6d69a0c2553e267f (patch)
treea30d523f1812b53826c2a80bdaf9538322f208a7 /apps/contacts/lib
parentd02b0e39b217ad4c9b27d7d87f7d4cfd4f6f942f (diff)
downloadnextcloud-server-f4285a25ef5e41ab02c8d34f6d69a0c2553e267f.tar.gz
nextcloud-server-f4285a25ef5e41ab02c8d34f6d69a0c2553e267f.zip
Don't include shared addressbook if source not found
Diffstat (limited to 'apps/contacts/lib')
-rw-r--r--apps/contacts/lib/share/addressbook.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/contacts/lib/share/addressbook.php b/apps/contacts/lib/share/addressbook.php
index 9e353453f36..f719bccb78f 100644
--- a/apps/contacts/lib/share/addressbook.php
+++ b/apps/contacts/lib/share/addressbook.php
@@ -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;
}