From 2b0ae6df9f9af260ba64a940078d6a5aa568153b Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Mon, 4 Jun 2018 08:45:04 +0200 Subject: [PATCH 1/2] Fix local users check in contacts menu Signed-off-by: Christoph Wurst --- lib/private/Contacts/ContactsMenu/ContactsStore.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/private/Contacts/ContactsMenu/ContactsStore.php b/lib/private/Contacts/ContactsMenu/ContactsStore.php index 43600470e1ff7..930652d6dad85 100644 --- a/lib/private/Contacts/ContactsMenu/ContactsStore.php +++ b/lib/private/Contacts/ContactsMenu/ContactsStore.php @@ -202,7 +202,8 @@ public function findOne(IUser $user, $shareType, $shareWith) { } } if ($shareType === 0 || $shareType === 6) { - if ($contact['UID'] === $shareWith && $contact['isLocalSystemBook'] === true) { + $isLocal = $contact['isLocalSystemBook'] ?? false; + if ($contact['UID'] === $shareWith && $isLocal === true) { $match = $contact; break; } From e5fb98d9fc0b30cfd66bb89b8c43f3ccd7cafc6a Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Mon, 4 Jun 2018 15:12:57 +0200 Subject: [PATCH 2/2] Fix syntax for php5.6 Signed-off-by: Christoph Wurst --- lib/private/Contacts/ContactsMenu/ContactsStore.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/private/Contacts/ContactsMenu/ContactsStore.php b/lib/private/Contacts/ContactsMenu/ContactsStore.php index 930652d6dad85..86ad39085a460 100644 --- a/lib/private/Contacts/ContactsMenu/ContactsStore.php +++ b/lib/private/Contacts/ContactsMenu/ContactsStore.php @@ -202,7 +202,7 @@ public function findOne(IUser $user, $shareType, $shareWith) { } } if ($shareType === 0 || $shareType === 6) { - $isLocal = $contact['isLocalSystemBook'] ?? false; + $isLocal = isset($contact['isLocalSystemBook']) ? $contact['isLocalSystemBook'] : false; if ($contact['UID'] === $shareWith && $isLocal === true) { $match = $contact; break;