#10792 fixed error 500 in agent status list

This commit is contained in:
Daniel Cebrian 2023-03-23 12:39:55 +01:00
parent cbbddd1ac6
commit 2683f9e6dc
1 changed files with 6 additions and 4 deletions

View File

@ -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(