diff --git a/pandora_console/godmode/massive/massive_add_policies_alerts.php b/pandora_console/godmode/massive/massive_add_policies_alerts.php index b1f289a3e3..13bd8819ba 100644 --- a/pandora_console/godmode/massive/massive_add_policies_alerts.php +++ b/pandora_console/godmode/massive/massive_add_policies_alerts.php @@ -134,7 +134,7 @@ $table->data[0][0] = html_print_label_input_block( $table->data[0][1] = html_print_label_input_block( __('Group recursion'), - html_print_checkbox('recursion', 1, $recursion, true, false, '', true) + html_print_checkbox('recursion', 1, ($recursion ?? false), true, false, '', true) ); $arr_policies = policies_get_policies(); diff --git a/pandora_console/godmode/massive/massive_add_policies_alerts_action_external.php b/pandora_console/godmode/massive/massive_add_policies_alerts_action_external.php index 177af408f1..32efc15606 100644 --- a/pandora_console/godmode/massive/massive_add_policies_alerts_action_external.php +++ b/pandora_console/godmode/massive/massive_add_policies_alerts_action_external.php @@ -138,7 +138,7 @@ $table->data[0][0] = html_print_label_input_block( $table->data[0][1] = html_print_label_input_block( __('Group recursion'), - html_print_checkbox('recursion', 1, $recursion, true, false, '', true) + html_print_checkbox('recursion', 1, ($recursion ?? false), true, false, '', true) ); $arr_policies = policies_get_policies(); diff --git a/pandora_console/godmode/massive/massive_edit_agents.php b/pandora_console/godmode/massive/massive_edit_agents.php index 9a57ef9d53..26ab73603c 100755 --- a/pandora_console/godmode/massive/massive_edit_agents.php +++ b/pandora_console/godmode/massive/massive_edit_agents.php @@ -631,8 +631,8 @@ if (is_metaconsole() === true) { echo '
'; echo html_print_avoid_autocomplete(); $params = [ - 'id_group' => $id_group, - 'recursion' => $recursion, + 'id_group' => ($id_group ?? ''), + 'recursion' => ($recursion ?? ''), ]; echo get_table_inputs_masive_agents($params); @@ -712,9 +712,9 @@ if (is_metaconsole() === false) { $table->data[0][1] .= '  '.__('Module').' '; $table->data[0][1] .= html_print_select( - $modules, + ($modules ?? ''), 'cascade_protection_module', - $cascade_protection_module, + ($cascade_protection_module ?? ''), '', '', 0, @@ -1162,7 +1162,7 @@ $table->data[7][0] = __('Safe operation mode').': '.ui_print_help_tip( ), true ); -$table->data[7][1] .= html_print_select( +$table->data[7][1] = html_print_select( [ 1 => __('Enabled'), 0 => __('Disabled'), @@ -1229,7 +1229,7 @@ if ($fields === false) { foreach ($fields as $field) { $data[0] = ''.$field['name'].''; $combo = []; - $combo = $field['combo_values']; + $combo = ($field['combo_values'] ?? ''); $combo = explode(',', $combo); $combo_values = []; foreach ($combo as $value) { @@ -1258,7 +1258,7 @@ foreach ($fields as $field) { '', 30, 100, - $view_mode, + ($view_mode ?? ''), '', '', true, diff --git a/pandora_console/godmode/massive/massive_edit_modules.php b/pandora_console/godmode/massive/massive_edit_modules.php index 2b8990c065..672c59276c 100755 --- a/pandora_console/godmode/massive/massive_edit_modules.php +++ b/pandora_console/godmode/massive/massive_edit_modules.php @@ -421,7 +421,7 @@ $table->data[4][0] = html_print_label_input_block( html_print_select( $tags, 'tags[]', - $tags_name, + ($tags_name ?? ''), false, __('Any'), -1, @@ -537,7 +537,7 @@ $table->data[8][0] = html_print_label_input_block( html_print_select( $tags, 'tags[]', - $tags_name, + ($tags_name ?? ''), false, __('Any'), -1, @@ -1304,7 +1304,7 @@ $table->data[29][0] = html_print_label_input_block( html_print_select_from_sql( 'SELECT id_tag, name FROM ttag ORDER BY name', 'id_tag[]', - $id_tag, + ($id_tag ?? ''), '', __('None'), '0', diff --git a/pandora_console/godmode/massive/massive_edit_users.php b/pandora_console/godmode/massive/massive_edit_users.php index 57274dc129..87ffb80bd4 100644 --- a/pandora_console/godmode/massive/massive_edit_users.php +++ b/pandora_console/godmode/massive/massive_edit_users.php @@ -476,12 +476,12 @@ if (is_metaconsole() === false) { $timezone_name = 'Asia/Shanghai'; } - $area_data_timezone_polys .= ''; + $area_data_timezone_polys = ''; foreach ($tz['polys'] as $coords) { $area_data_timezone_polys .= ''; } - $area_data_timezone_rects .= ''; + $area_data_timezone_rects = ''; foreach ($tz['rects'] as $coords) { $area_data_timezone_rects .= ''; } @@ -543,7 +543,7 @@ echo sprintf( '
%s %s %s %s %s %s %s %s %s %s
', $language, $size_pagination, - $skin, + ($skin ?? ''), $home_screen, $event_filter, $autorefresh_show, diff --git a/pandora_console/godmode/massive/massive_operations.php b/pandora_console/godmode/massive/massive_operations.php index be396d2a1b..3480b66a92 100755 --- a/pandora_console/godmode/massive/massive_operations.php +++ b/pandora_console/godmode/massive/massive_operations.php @@ -348,6 +348,10 @@ if (check_acl($config['id_user'], 0, 'UM')) { $onheader['user_agents'] = $userstab; } +if (isset($servicestab) === false) { + $servicestab = ''; +} + $onheader['massive_alerts'] = $alertstab; $onheader['massive_policies_alerts'] = $policiesalertstab; $onheader['massive_policies_alerts_external'] = $policiesalertsexternaltab; diff --git a/pandora_console/godmode/resources/resources_export_import.php b/pandora_console/godmode/resources/resources_export_import.php index 86583ec69b..cbdd3b0f59 100644 --- a/pandora_console/godmode/resources/resources_export_import.php +++ b/pandora_console/godmode/resources/resources_export_import.php @@ -268,8 +268,8 @@ echo ''; if (msg.status === true) { title = ""; message = ""; - const name = ""; - const type = ""; + const name = ""; + const type = ""; message += ` ${type} - ${name}`; } else { title = ""; diff --git a/pandora_console/include/class/HTML.class.php b/pandora_console/include/class/HTML.class.php index 50999ac67b..9247f2dbeb 100644 --- a/pandora_console/include/class/HTML.class.php +++ b/pandora_console/include/class/HTML.class.php @@ -676,6 +676,10 @@ class HTML $input['arguments'] = ''; } + if (isset($input['arguments']['type']) === false) { + $input['arguments']['type'] = ''; + } + if ($input['arguments']['type'] != 'hidden' && $input['arguments']['type'] != 'hidden_extended' ) { diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index e520303c1d..8435c802b8 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -2075,7 +2075,7 @@ function html_print_extended_select_for_post_process( $found = false; if ($selected) { - if (array_key_exists(number_format($selected, 14, $config['decimal_separator'], $config['thousand_separator']), $fields)) { + if (array_key_exists(number_format($selected, 14, $config['decimal_separator'], ($config['thousand_separator'] ?? ',')), $fields)) { $found = true; } }