mirror of
https://github.com/owncloudarchive/contacts.git
synced 2024-11-29 11:24:11 +01:00
Merge pull request #824 from martin-rueegg/martin-rueegg-avoid-offset-error
Avoid "Undefined offset: 0"
This commit is contained in:
commit
1642fa5419
@ -85,9 +85,11 @@ class Shared extends Database {
|
||||
Contacts\Share\Addressbook::FORMAT_ADDRESSBOOKS
|
||||
);
|
||||
|
||||
// Not sure if I'm doing it wrongly, or if its supposed to return
|
||||
// the info in an array?
|
||||
$addressBook = (isset($addressBook['permissions']) ? $addressBook : $addressBook[0]);
|
||||
if(count($addressBook) == 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$addressBook = $addressBook[0];
|
||||
|
||||
if(!isset($addressBook['permissions'])) {
|
||||
return null;
|
||||
|
Loading…
Reference in New Issue
Block a user