From 884ae7fe94bdda0860823cbe3f050043f8da194c Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 16 Oct 2020 13:32:17 +0200 Subject: [PATCH] fix error creating new accounts --- api/src/Contacts.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/src/Contacts.php b/api/src/Contacts.php index 386246aedf..3c5223e660 100755 --- a/api/src/Contacts.php +++ b/api/src/Contacts.php @@ -1267,10 +1267,10 @@ class Contacts extends Contacts\Storage * @param array[]& $shared_with array of arrays with values for keys "shared_with", "shared_by", ... * @return array of entries removed from $shared_with because current user is not allowed to share into (key is preserved) */ - function check_shared_with(array &$shared_with) + function check_shared_with(array &$shared_with=null) { $removed = []; - foreach($shared_with as $key => $shared) + foreach((array)$shared_with as $key => $shared) { if (!empty($shared['shared_by']) && $shared['shared_by'] != $this->user) {