From 8e88e0a603c44787f0f31e77447e53f3675e4c59 Mon Sep 17 00:00:00 2001 From: Daniel Cebrian Date: Tue, 21 Mar 2023 11:45:38 +0100 Subject: [PATCH] #10747 fixed error 500 in agent --- pandora_console/operation/agentes/ver_agente.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/pandora_console/operation/agentes/ver_agente.php b/pandora_console/operation/agentes/ver_agente.php index b21cca1b32..cd821f3523 100644 --- a/pandora_console/operation/agentes/ver_agente.php +++ b/pandora_console/operation/agentes/ver_agente.php @@ -1481,12 +1481,13 @@ if ($policyTab === ENTERPRISE_NOT_HOOK) { // Omnishell. -$tasks = count_tasks_agent($id_agente); - -if ($tasks === true) { - $omnishellTab = enterprise_hook('omnishell_tab'); - if ($omnishellTab == -1) { - $omnishellTab = ''; +if (function_exists('count_tasks_agent')) { + $tasks = count_tasks_agent($id_agente); + if ($tasks === true) { + $omnishellTab = enterprise_hook('omnishell_tab'); + if ($omnishellTab == -1) { + $omnishellTab = ''; + } } }