summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2016-01-28 16:01:34 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2016-02-02 10:56:33 +0100
commit847b1e3af0f4f76dd8d3fc683019a6de56c16957 (patch)
tree54a8e77bcf1fe65e4bc6bc521da58cc19fefe0e8 /apps
parentca25055cc8331c65606d5cb7b27a0a0d1c5ac01f (diff)
downloadnextcloud-server-847b1e3af0f4f76dd8d3fc683019a6de56c16957.tar.gz
nextcloud-server-847b1e3af0f4f76dd8d3fc683019a6de56c16957.zip
In some cases $contact['CLOUD'] is not an array
Diffstat (limited to 'apps')
-rw-r--r--apps/files_sharing/api/sharees.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/files_sharing/api/sharees.php b/apps/files_sharing/api/sharees.php
index d23a6f56501..c6bef8d784d 100644
--- a/apps/files_sharing/api/sharees.php
+++ b/apps/files_sharing/api/sharees.php
@@ -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;