• Модуль: cluster
  • Путь к файлу: ~/bitrix/modules/cluster/classes/general/redis.php
  • Класс: CClusterRedis
  • Вызов: CClusterRedis::checkFields
public function checkFields(&$fields) : array
{
	global $APPLICATION;

	$error = [];
	$status = [];

	$fields['PORT'] = intval($fields['PORT']);
	if ($fields['PORT'] > 0 && isset($fields['HOST']))
	{
		$status = self::getStatus($fields);

		if ($status['message'] !== null)
		{
			$error[] = [
				'id' => $fields['HOST'],
				'text' => Loc:: getMessage('CLU_REDIS_CANNOT_CONNECT')
			];
		}
	}

	if (!empty($error))
	{
		$e = new CAdminException($error);
		$APPLICATION->ThrowException($e);
		return [];
	}

	return $status;
}