mirror of
https://github.com/retailcrm/opencart-module.git
synced 2024-11-22 05:06:07 +03:00
ref #90088 fix code
This commit is contained in:
parent
7d3390bc02
commit
792546d007
@ -165,11 +165,13 @@ class ModelExtensionRetailcrmReferences extends Model
|
|||||||
{
|
{
|
||||||
$response = $this->retailcrmApiClient->sitesList();
|
$response = $this->retailcrmApiClient->sitesList();
|
||||||
|
|
||||||
if (!$response) {
|
if (!$response || !$response->isSuccessful()) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
return (!$response->isSuccessful()) ? [] : end($response->sites);
|
$sites = $response->sites;
|
||||||
|
|
||||||
|
return end($sites);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user