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

This commit is contained in:
the-djmaze 2022-03-22 17:13:32 +01:00
parent e452c3516a
commit 22472ea1f1

View file

@ -215,8 +215,8 @@ trait Accounts
return $this->FalseResponse(__FUNCTION__);
}
$oAccount = $this->getMainAccountFromToken();
if (1 < \count($aAccounts)) {
if (\is_array($aAccounts) && 1 < \count($aAccounts)) {
$oAccount = $this->getMainAccountFromToken();
$aAccounts = \array_filter(\array_merge(
\array_fill_keys($aAccounts, null),
$this->GetAccounts($oAccount)