mirror of
https://github.com/retailcrm/opencart-module.git
synced 2025-04-04 05:43:37 +03:00
ref #90088 fix code
This commit is contained in:
parent
7d3390bc02
commit
792546d007
1 changed files with 4 additions and 2 deletions
|
@ -165,11 +165,13 @@ class ModelExtensionRetailcrmReferences extends Model
|
|||
{
|
||||
$response = $this->retailcrmApiClient->sitesList();
|
||||
|
||||
if (!$response) {
|
||||
if (!$response || !$response->isSuccessful()) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return (!$response->isSuccessful()) ? [] : end($response->sites);
|
||||
$sites = $response->sites;
|
||||
|
||||
return end($sites);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue