diff options
author | Michael Gapczynski <mtgap@owncloud.com> | 2012-08-08 19:12:59 -0400 |
---|---|---|
committer | Michael Gapczynski <mtgap@owncloud.com> | 2012-08-08 19:12:59 -0400 |
commit | f4285a25ef5e41ab02c8d34f6d69a0c2553e267f (patch) | |
tree | a30d523f1812b53826c2a80bdaf9538322f208a7 /apps/contacts/lib | |
parent | d02b0e39b217ad4c9b27d7d87f7d4cfd4f6f942f (diff) | |
download | nextcloud-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.php | 6 |
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; } |