Skip to content

Commit 84908cf

Browse files
committed
Fixing __call for non api functions
1 parent 288e6f5 commit 84908cf

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

php-binance-api-rate-limiter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,9 +236,9 @@ private function ordersPerDay()
236236
*/
237237
public function __call(string $name, array $arguments)
238238
{
239-
$weight = $this->weights[$name];
239+
$weight = $this->weights[$name] ?? false;
240240

241-
if ($weight > 0) {
241+
if ($weight && $weight > 0) {
242242
$this->requestsPerMinute();
243243
if (in_array($name, $this->ordersfunctions) === true) {
244244
$this->ordersPerSecond();

0 commit comments

Comments
 (0)