Skip to content

Commit

Permalink
return [] when there are no relations
Browse files Browse the repository at this point in the history
  • Loading branch information
petericebear committed Jul 14, 2020
1 parent ca28fc3 commit 40fd364
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,9 @@ public function getRelations($keyword = '', $code = '', $id = 0): array
]);

$this->checkError('GetRelaties', $result);

if (! isset($result->GetRelatiesResult->Relaties->cRelatie)) {
return [];
}
$relations = $result->GetRelatiesResult->Relaties->cRelatie;

if (! is_array($relations)) {
Expand Down

0 comments on commit 40fd364

Please sign in to comment.