mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-03-10 05:01:15 +01:00
fix PHP TypeError array_search(): Argument #2 ($haystack) must be of type array, int given
This commit is contained in:
parent
1c8dfb7b2d
commit
8f135b13e5
@ -468,10 +468,10 @@ class Sql
|
||||
|
||||
$filter = [];
|
||||
// implement negated account_id filter used for hidden accounts/groups
|
||||
if (!empty($param['account_id']) && ($not_account_ids = array_search('!', $param['account_id'])) !== false)
|
||||
if (!empty($param['account_id']) && is_array($param['account_id']) && ($not_account_ids = array_search('!', $param['account_id'])) !== false)
|
||||
{
|
||||
unset($param['account_id'][$not_account_ids]);
|
||||
$filter[] = $this->db->expression(self::TABLE, 'NOT ('.self::TABLE.'.', ['account_id' => array_map('abs', (array)$param['account_id'])], ')');
|
||||
$filter[] = $this->db->expression(self::TABLE, 'NOT ('.self::TABLE.'.', ['account_id' => array_map('abs', $param['account_id'])], ')');
|
||||
unset($param['account_id']);
|
||||
}
|
||||
switch($param['type'])
|
||||
|
Loading…
Reference in New Issue
Block a user