diff --git a/pandora_console/include/functions_inventory.php b/pandora_console/include/functions_inventory.php index a6fc8b248d..a93a760f88 100644 --- a/pandora_console/include/functions_inventory.php +++ b/pandora_console/include/functions_inventory.php @@ -99,9 +99,9 @@ function inventory_get_data( // Prepare pagination. $url = sprintf( '?sec=estado&sec2=operation/inventory/inventory&agent_id=%s&agent=%s&id_group=%s&export=%s&module_inventory_general_view=%s&search_string=%s&utimestamp=%s&period=%s&order_by_agent=%s&submit_filter=%d', - $pagination_url_parameters['inventory_id_agent'], - $pagination_url_parameters['inventory_agent'], - $pagination_url_parameters['inventory_id_group'], + (isset($pagination_url_parameters['inventory_id_agent']) ?? ''), + (isset($pagination_url_parameters['inventory_agent']) ?? ''), + (isset($pagination_url_parameters['inventory_id_group']) ?? ''), $export_csv, $inventory_module_name, $inventory_search_string, diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index af05902517..27ea241de8 100755 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -3352,8 +3352,8 @@ function reporting_inventory($report, $content, $type) $date, '', false, - 'csv', false, + 'csv', '', [], $inventory_regular_expression @@ -3367,12 +3367,13 @@ function reporting_inventory($report, $content, $type) $date, '', false, - 'hash', false, + 'hash', '', [], $inventory_regular_expression ); + break; } diff --git a/pandora_console/include/functions_reporting_html.php b/pandora_console/include/functions_reporting_html.php index 35371a4f57..ae7279a40d 100644 --- a/pandora_console/include/functions_reporting_html.php +++ b/pandora_console/include/functions_reporting_html.php @@ -2644,7 +2644,7 @@ function reporting_html_inventory($table, $item, $pdf=0) } else { // Grouped type inventory. $type_modules = array_reduce( - $item['data'], + ($item['data'] ?? []), function ($carry, $it) { $carry[$it['name']][] = $it; return $carry;