Skip to content

Commit 1ecba7c

Browse files
ePascalCMax Grim
authored and
Max Grim
committed
Updating uasort to be PHP8 compliant
As per ccxt#326 ccxt#326 (comment)
1 parent acc10cb commit 1ecba7c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

php-binance-api.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -1424,7 +1424,9 @@ protected function balanceData(array $array, $priceData)
14241424
}
14251425
if (is_array($priceData)) {
14261426
uasort($balances, function ($opA, $opB) {
1427-
return $opA['btcValue'] < $opB['btcValue'];
1427+
if ($opA == $opB)
1428+
return 0;
1429+
return ($opA['btcValue'] < $opB['btcValue']) ? -1 : 1;
14281430
});
14291431
$this->btc_value = $btc_value;
14301432
$this->btc_total = $btc_total;

0 commit comments

Comments
 (0)