In some cases $contact['CLOUD'] is not an array

This commit is contained in:
Thomas Müller 2016-01-28 16:01:34 +01:00
parent ca25055cc8
commit 847b1e3af0
1 changed files with 5 additions and 1 deletions

View File

@ -271,7 +271,11 @@ class Sharees {
$foundRemoteById = false;
foreach ($addressBookContacts as $contact) {
if (isset($contact['CLOUD'])) {
foreach ($contact['CLOUD'] as $cloudId) {
$cloudIds = $contact['CLOUD'];
if (!is_array($cloudIds)) {
$cloudIds = [$cloudIds];
}
foreach ($cloudIds as $cloudId) {
if (strtolower($contact['FN']) === $search || strtolower($cloudId) === $search) {
if (strtolower($cloudId) === $search) {
$foundRemoteById = true;