Silence some warnings

This commit is contained in:
nathangray 2021-04-05 11:25:57 -06:00
parent 060710a74a
commit f7af9c3c0f
2 changed files with 2 additions and 2 deletions

View File

@ -421,7 +421,7 @@ class addressbook_hooks
{ {
// Add users / groups this contact is shared with // Add users / groups this contact is shared with
$entry['shared_with'] = []; $entry['shared_with'] = [];
foreach($entry['shared'] as $id => $share) foreach((array)$entry['shared'] as $id => $share)
{ {
$entry['shared_with'][] = $share['shared_with']; $entry['shared_with'][] = $share['shared_with'];
} }

View File

@ -2229,7 +2229,7 @@ class addressbook_ui extends addressbook_bo
if (is_array($content)) if (is_array($content))
{ {
// sync $content['shared'] with $content['shared_values'] // 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']; $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) if (($k = array_search($shared_value, (array)$content['shared_values'])) === false)