fix count(): Argument #1 ($value) must be of type Countable|array, null given

This commit is contained in:
ralf 2024-09-13 08:38:10 +02:00
parent eacb9e5494
commit 6105f02459

View File

@ -266,8 +266,8 @@ class Accounts
{
return $this->backend->search($param);
}, [], self::READ_CACHE_TIMEOUT);
$this->total = count($result);
if (!empty($param['offset']))
$this->total = $result ? count($result) : 0;
if ($result && !empty($param['offset']))
{
return array_slice($result, $param['start'], $param['offset'], true);
}