Silence some warnings & debug

This commit is contained in:
nathangray 2021-03-05 09:13:12 -07:00
parent 6b3cc6f7b5
commit 95f84454be
3 changed files with 3 additions and 3 deletions

View File

@ -557,7 +557,7 @@ class Categories
$owner_grant = false;
foreach(explode(',',$category['owner']) as $owner)
{
$owner_grant = $owner_grant || (($this->grants[$owner] & $needed) &&
$owner_grant = $owner_grant || (is_array($this->grants) && ($this->grants[$owner] & $needed) &&
($category['access'] == 'public' || ($this->grants[$owner] & Acl::PRIVAT)));
}
return $acl_grant && $owner_grant;

View File

@ -1271,7 +1271,7 @@ class Contacts extends Contacts\Storage
$shared['shared_writable'] && $this->check_perms($needed, $contact, $deny_account_delete, $shared['shared_by'], $check_shared-1)))
{
$access = "shared";
error_log(__METHOD__."($needed,$contact[id],$deny_account_delete,$user,$check_shared) shared=".json_encode($shared)." returning ".array2string($access));
//error_log(__METHOD__."($needed,$contact[id],$deny_account_delete,$user,$check_shared) shared=".json_encode($shared)." returning ".array2string($access));
break;
}
}

View File

@ -292,7 +292,7 @@ abstract class Merge
foreach($ignore_acl ? Customfields::get('addressbook', true) : $this->contacts->customfields as $name => $field)
{
$name = '#'.$name;
if(!$contact[$name])
if(!array_key_exists($name, $contact) || !$contact[$name])
{
$replacements['$$'.($prefix ? $prefix.'/':'').$name.'$$'] = '';
continue;