Skip to content

Commit

Permalink
fix error checking
Browse files Browse the repository at this point in the history
  • Loading branch information
ro0NL authored and nekufa committed Mar 25, 2024
1 parent 543d62d commit c68f983
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function api($command, array $args = [], ?Closure $callback = null): ?obj

$result = $this->dispatch($subject, $options);

if (property_exists($result, 'error')) {
if ($result->error ?? false) {
throw new Exception($result->error->description, $result->error->err_code);
}

Expand Down

0 comments on commit c68f983

Please sign in to comment.