mirror of
https://github.com/retailcrm/opencart-module.git
synced 2024-11-21 20:56: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();
|
||||
|
||||
if (!$response) {
|
||||
if (!$response || !$response->isSuccessful()) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return (!$response->isSuccessful()) ? [] : end($response->sites);
|
||||
$sites = $response->sites;
|
||||
|
||||
return end($sites);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user