From f7af9c3c0f3d8a2e6f1bbd10f956cbb4e3bd7b28 Mon Sep 17 00:00:00 2001 From: nathangray Date: Mon, 5 Apr 2021 11:25:57 -0600 Subject: [PATCH] Silence some warnings --- addressbook/inc/class.addressbook_hooks.inc.php | 2 +- addressbook/inc/class.addressbook_ui.inc.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addressbook/inc/class.addressbook_hooks.inc.php b/addressbook/inc/class.addressbook_hooks.inc.php index 3e59d85b65..ff4d1134f2 100644 --- a/addressbook/inc/class.addressbook_hooks.inc.php +++ b/addressbook/inc/class.addressbook_hooks.inc.php @@ -421,7 +421,7 @@ class addressbook_hooks { // Add users / groups this contact is shared with $entry['shared_with'] = []; - foreach($entry['shared'] as $id => $share) + foreach((array)$entry['shared'] as $id => $share) { $entry['shared_with'][] = $share['shared_with']; } diff --git a/addressbook/inc/class.addressbook_ui.inc.php b/addressbook/inc/class.addressbook_ui.inc.php index c354f3faf2..3270dece49 100644 --- a/addressbook/inc/class.addressbook_ui.inc.php +++ b/addressbook/inc/class.addressbook_ui.inc.php @@ -2229,7 +2229,7 @@ class addressbook_ui extends addressbook_bo if (is_array($content)) { // sync $content['shared'] with $content['shared_values'] - foreach($content['shared'] as $key => $shared) + foreach((array)$content['shared'] as $key => $shared) { $shared_value = $shared['shared_id'].':'.$shared['shared_with'].':'.$shared['shared_by'].':'.$shared['shared_writable']; if (($k = array_search($shared_value, (array)$content['shared_values'])) === false)