Skip to content

Commit 4fbcc81

Browse files
authored
Expect an empty array for account balances by nilsenpaul
2 parents 22c7b8d + 0d4bd41 commit 4fbcc81

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

php-binance-api.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -832,8 +832,9 @@ public function balances($priceData = false)
832832
echo "Error: unable to fetch your account details" . PHP_EOL;
833833
}
834834

835-
if (isset($account['balances']) === false) {
835+
if (isset($account['balances']) === false || empty($account['balances'])) {
836836
echo "Error: your balances were empty or unset" . PHP_EOL;
837+
return [];
837838
}
838839

839840
return $this->balanceData($account, $priceData);

0 commit comments

Comments
 (0)