Skip to content

Commit

Permalink
Fixing __call for non api functions
Browse files Browse the repository at this point in the history
  • Loading branch information
munvier committed Jun 11, 2020
1 parent 288e6f5 commit 84908cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions php-binance-api-rate-limiter.php
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,9 @@ private function ordersPerDay()
*/
public function __call(string $name, array $arguments)
{
$weight = $this->weights[$name];
$weight = $this->weights[$name] ?? false;

if ($weight > 0) {
if ($weight && $weight > 0) {
$this->requestsPerMinute();
if (in_array($name, $this->ordersfunctions) === true) {
$this->ordersPerSecond();
Expand Down

0 comments on commit 84908cf

Please sign in to comment.