diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 0f613890d5..8c8a7870e9 100755 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -15849,6 +15849,11 @@ function reporting_module_histogram_graph($report, $content, $pdf=0) ]; $width_graph = 100; + if ($metaconsole_on && $server_name != '') { + // Restore db connection. + metaconsole_restore_db(); + } + if (empty($array_result) === false) { $return['chart'] = flot_slicesbar_graph( $array_result, @@ -15875,11 +15880,6 @@ function reporting_module_histogram_graph($report, $content, $pdf=0) $return['chart'] = graph_nodata_image(['height' => $height_graph]); } - if ($metaconsole_on && $server_name != '') { - // Restore db connection. - metaconsole_restore_db(); - } - return reporting_check_structure_content($return); }