mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-29 03:13:40 +01:00
Merge pull request #60 from asig2016/fix_count
Fixed, PHP Warning: count(): Parameter must be an array or an object …
This commit is contained in:
commit
36e9984be3
@ -843,7 +843,7 @@ class admin_mail
|
||||
list($content['acc_id']) = each($content['accounts']);
|
||||
//error_log(__METHOD__.__LINE__.'.'.array2string($content['acc_id']));
|
||||
// test if the "to be selected" acccount is imap or not
|
||||
if (count($content['accounts'])>1 && Mail\Account::is_multiple($content['acc_id']))
|
||||
if (is_array($content['accounts']) && count($content['accounts'])>1 && Mail\Account::is_multiple($content['acc_id']))
|
||||
{
|
||||
try {
|
||||
$account = Mail\Account::read($content['acc_id'], $content['called_for']);
|
||||
@ -1337,7 +1337,7 @@ class admin_mail
|
||||
}
|
||||
Framework::message($msg ? $msg : (string)$_GET['msg'], $msg_type);
|
||||
|
||||
if (count($content['account_id']) > 1)
|
||||
if (is_array($content['account_id']) && count($content['account_id']) > 1)
|
||||
{
|
||||
$tpl->setElementAttribute('account_id', 'multiple', true);
|
||||
$readonlys['button[multiple]'] = true;
|
||||
|
@ -532,7 +532,7 @@ class Sql extends Api\Storage
|
||||
$filter['private'] = 0;
|
||||
}
|
||||
// if multiple addressbooks (incl. current owner) are searched, we need full acl filter
|
||||
elseif(count($filter['owner']) > 1)
|
||||
elseif(is_array($filter['owner']) && count($filter['owner']) > 1)
|
||||
{
|
||||
$filter[] = "($this->table_name.contact_owner=".(int)$GLOBALS['egw_info']['user']['account_id'].
|
||||
" OR contact_private=0 AND $this->table_name.contact_owner IN (".
|
||||
|
Loading…
Reference in New Issue
Block a user