From 371f87bcdf248065b9464f1157e959c40999ffb1 Mon Sep 17 00:00:00 2001 From: Calvo Date: Wed, 21 Apr 2021 15:47:56 +0200 Subject: [PATCH] Fixed bug on api call create_agent --- pandora_console/include/functions_api.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/include/functions_api.php b/pandora_console/include/functions_api.php index 03dba95653..de094fabad 100644 --- a/pandora_console/include/functions_api.php +++ b/pandora_console/include/functions_api.php @@ -1682,7 +1682,7 @@ function api_set_new_agent($thrash1, $thrash2, $other, $thrash3) // Check if agent exists (BUG WC-50518-2). if ($alias == '' && $alias_as_name === 0) { returnError('No agent alias specified'); - } else if (agents_get_agent_id($server_name)) { + } else if (agents_get_agent_id($nombre_agente)) { returnError('The agent name already exists in DB.'); } else if (db_get_value_sql('SELECT id_grupo FROM tgrupo WHERE id_grupo = '.$grupo) === false) { returnError('The group does not exist.');