fix error creating new accounts

This commit is contained in:
Ralf Becker 2020-10-16 13:32:17 +02:00
parent 83eabe4d8e
commit 884ae7fe94

View File

@ -1267,10 +1267,10 @@ class Contacts extends Contacts\Storage
* @param array[]& $shared_with array of arrays with values for keys "shared_with", "shared_by", ... * @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) * @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 = []; $removed = [];
foreach($shared_with as $key => $shared) foreach((array)$shared_with as $key => $shared)
{ {
if (!empty($shared['shared_by']) && $shared['shared_by'] != $this->user) if (!empty($shared['shared_by']) && $shared['shared_by'] != $this->user)
{ {