Skip to content

Commit

Permalink
Avoid error if no search results are returned from pixx.io
Browse files Browse the repository at this point in the history
  • Loading branch information
kdambekalns committed Feb 16, 2022
1 parent 7dee437 commit b56a368
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Classes/AssetSource/PixxioAssetProxyQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,9 @@ public function getArrayResult(): array
$response = $this->sendSearchRequest($this->limit, $this->orderings);
$responseObject = \GuzzleHttp\json_decode($response->getBody());

if (!isset($responseObject->files)) {
return [];
}
foreach ($responseObject->files as $rawAsset) {
$assetProxies[] = PixxioAssetProxy::fromJsonObject($rawAsset, $this->assetSource);
}
Expand Down

0 comments on commit b56a368

Please sign in to comment.