Помогите решить проблему или подскажите где искать. Ставлю официальный модуль RetailCRM, почему-то при сохранении настроек вылазить ошибка Fatal error: Call to a member function apiVersions() on null in /home/admin/controller/extension/module/retailcrm.php on line 622 Вот функция на которую ругается. Строка 622 - $response = $apiClient->apiVersions();
private function validate()
{
$versionsMap = array(
'v3' => '3.0',
'v4' => '4.0',
'v5' => '5.0'
);
if (!empty($this->request->post[$this->moduleTitle . '_url']) && !empty($this->request->post[$this->moduleTitle . '_apikey'])) {
$apiClient = $this->retailcrm->getApiClient(
$this->request->post[$this->moduleTitle . '_url'],
$this->request->post[$this->moduleTitle . '_apikey']
);
}
$response = $apiClient->apiVersions();
if ($response && $response->isSuccessful()) {
if (!in_array($versionsMap[$this->request->post[$this->moduleTitle . '_apiversion']], $response['versions'])) {
$this->_error['warning'] = $this->language->get('text_error_api');
}
} else {
$this->_error['warning'] = $this->language->get('text_error_save');
}
if (!$this->user->hasPermission('modify', 'extension/module/retailcrm')) {
$this->_error['warning'] = $this->language->get('error_permission');
}
if (isset($this->request->post[$this->moduleTitle . '_collector']['custom']) &&
$this->request->post[$this->moduleTitle . '_collector']['custom_form'] == 1) {
$customField = $this->request->post[$this->moduleTitle . '_collector']['custom'];
if (empty($customField['name']) && empty($customField['email']) && empty($customField['phone'])) {
$this->_error['fields'] = $this->language->get('text_error_collector_fields');
}
}
if (!$this->_error) {
return true;
} else {
return false;
}
}
Пробовал ставить на чистый OpenCart, та же ошибка, сервер работает на CentOS 7, php 5.6.36, OpenCart 2.3.0.2