Skip to content

Commit

Permalink
Fix error when AppGroup list is empty or doesnt returns appgroups arr…
Browse files Browse the repository at this point in the history
…ay (#327)
  • Loading branch information
shishir-intelli authored Dec 1, 2023
1 parent a34f592 commit 263a871
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Api/ApigeeX/Controller/PaginationHelperTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ protected function listEntities(PagerInterface $pager = null, array $query_param
// Ignore entity type key from response, ex.: developer, apiproduct,
// etc.
$responseArray = reset($responseArray);
if (empty($responseArray)) {
// Appgroup can be empty.
if (empty($responseArray) || !is_array($responseArray)) {
return [];
}
$entities = $this->responseArrayToArrayOfEntities($responseArray, $key_provider);
Expand Down

0 comments on commit 263a871

Please sign in to comment.