From cc96c8141ee0a4c37f0cb184e4ea0305515ddda7 Mon Sep 17 00:00:00 2001 From: Alejandro Gallardo Escobar Date: Wed, 1 Oct 2014 19:03:24 +0200 Subject: [PATCH] Fixed an error on the function "reporting_network_interfaces_table" when the output is in PDF type --- pandora_console/include/functions_reporting.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 248f4d553d..4bf73d8a5b 100644 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -7625,12 +7625,15 @@ function reporting_network_interfaces_table ($content, $report, $mini, $item_tit $network_interfaces_by_agents = agents_get_network_interfaces(false, $filter); if (empty($network_interfaces_by_agents)) { - $data = array(); - $table->colspan[$next_row][0] = 3; - $next_row++; - $data[0] = __('The group has no agents or none of the agents has any network interface'); - array_push ($table->data, $data); - $slas = array(); + if ($is_pdf) { + $pdf->addHTML(__('The group has no agents or none of the agents has any network interface')); + } + else if ($is_html) { + $data = array(); + $data[0] = __('The group has no agents or none of the agents has any network interface'); + $table->colspan[$next_row][0] = 3; + array_push ($table->data, $data); + } return; } else {