From 3ef4482af28255b4fe93f42a613cd339cad80331 Mon Sep 17 00:00:00 2001 From: daniel Date: Thu, 19 Jan 2023 17:50:27 +0100 Subject: [PATCH] fix custom graph sql pandora_enterprise#10196 --- pandora_console/include/functions_graph.php | 5 +++-- pandora_console/include/graphs/fgraph.php | 8 ++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/pandora_console/include/functions_graph.php b/pandora_console/include/functions_graph.php index ca9418374e..0f6d03fee7 100644 --- a/pandora_console/include/functions_graph.php +++ b/pandora_console/include/functions_graph.php @@ -3489,8 +3489,9 @@ function graph_custom_sql_graph( $data_result = []; } - $data = []; - $labels = []; + $data_bar = []; + $labels_pie = []; + $data_pie = []; $count = 0; $other = 0; foreach ($data_result as $data_item) { diff --git a/pandora_console/include/graphs/fgraph.php b/pandora_console/include/graphs/fgraph.php index 10de1c11f9..46436167d1 100644 --- a/pandora_console/include/graphs/fgraph.php +++ b/pandora_console/include/graphs/fgraph.php @@ -154,14 +154,14 @@ function progressbar( /** * Draw vertical bars graph. * - * @param array $chart_data Data chart. - * @param array $params Params draw chart. - * @param integer $ttl Pdf option. + * @param array|null $chart_data Data chart. + * @param array $params Params draw chart. + * @param integer $ttl Pdf option. * * @return mixed */ function vbar_graph( - array $chart_data, + array|null $chart_data, array $options ) { if (empty($chart_data) === true) {