From 2683f9e6dc32d5e0477379f4c772f8b60f5d95e0 Mon Sep 17 00:00:00 2001 From: Daniel Cebrian Date: Thu, 23 Mar 2023 12:39:55 +0100 Subject: [PATCH] #10792 fixed error 500 in agent status list --- pandora_console/operation/agentes/estado_agente.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pandora_console/operation/agentes/estado_agente.php b/pandora_console/operation/agentes/estado_agente.php index b4e60f8ddf..815ee32e6c 100644 --- a/pandora_console/operation/agentes/estado_agente.php +++ b/pandora_console/operation/agentes/estado_agente.php @@ -375,10 +375,12 @@ $table->data[1][0] = html_print_label_input_block( html_print_select($fields, 'os', $os, '', 'All', 0, true) ); -$pre_fields = policies_get_policies(false, ['id', 'name']); -$fields = []; -foreach ($pre_fields as $value) { - $fields[$value['id']] = $value['name']; +if (function_exists('policies_get_policies') === true) { + $pre_fields = policies_get_policies(false, ['id', 'name']); + $fields = []; + foreach ($pre_fields as $value) { + $fields[$value['id']] = $value['name']; + } } $table->data[1][1] = html_print_label_input_block(