#10747 fixed error 500 in agent

This commit is contained in:
Daniel Cebrian 2023-03-21 11:45:38 +01:00
parent 361ecf4019
commit 8e88e0a603
1 changed files with 7 additions and 6 deletions

View File

@ -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 = '';
}
}
}