Skip to content

Commit

Permalink
ref #90088 fix code
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan Chaplygin committed Jun 7, 2023
1 parent 7d3390b commit 792546d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/upload/admin/model/extension/retailcrm/references.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,13 @@ public function getApiSite()
{
$response = $this->retailcrmApiClient->sitesList();

if (!$response) {
if (!$response || !$response->isSuccessful()) {
return [];
}

return (!$response->isSuccessful()) ? [] : end($response->sites);
$sites = $response->sites;

return end($sites);
}

/**
Expand Down

0 comments on commit 792546d

Please sign in to comment.