From 1ea4eba5d15555990a7f0c79c5199b39b48ea79e Mon Sep 17 00:00:00 2001 From: Joe Hunt Date: Sun, 10 Nov 2019 01:07:53 +0100 Subject: [PATCH] count error when printing to Excel. Fixed. --- reporting/includes/Workbook.php | 2 +- reporting/includes/excel_report.inc | 2 +- reporting/includes/pdf_report.inc | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/reporting/includes/Workbook.php b/reporting/includes/Workbook.php index 7e64a1b3..04785f05 100644 --- a/reporting/includes/Workbook.php +++ b/reporting/includes/Workbook.php @@ -6653,7 +6653,7 @@ class Spreadsheet_Excel_Writer_Worksheet extends Spreadsheet_Excel_Writer_BIFFwr $colcount = count($this->_colinfo); for ($i = 0; $i < $colcount; $i++) { // Skip cols without outline level info. - if (count($col_level) >= 6) { + if (count_array($col_level) >= 6) { $col_level = max($this->_colinfo[$i][5], $col_level); } } diff --git a/reporting/includes/excel_report.inc b/reporting/includes/excel_report.inc index 483d0fde..1ee91c70 100644 --- a/reporting/includes/excel_report.inc +++ b/reporting/includes/excel_report.inc @@ -240,7 +240,7 @@ class FrontReport extends Spreadsheet_Excel_Writer_Workbook $this->headers2 = $headers2; $this->aligns2 = $aligns2; $this->numcols = count($this->headers); - $tcols = count($this->headers2); + $tcols = count_array($this->headers2); if ($tcols > $this->numcols) $this->numcols = $tcols; for ($i = 0; $i < $this->numcols; $i++) diff --git a/reporting/includes/pdf_report.inc b/reporting/includes/pdf_report.inc index 29f6a5bb..a0a78be9 100644 --- a/reporting/includes/pdf_report.inc +++ b/reporting/includes/pdf_report.inc @@ -371,7 +371,7 @@ class FrontReport extends Cpdf $this->Font('italic'); if ($this->headers2 != null) { - $count = count($this->headers2); + $count = count_array($this->headers2); for ($i = 0; $i < $count; $i++) $this->TextCol2($i, $i + 1, $this->headers2[$i]); $this->NewLine(); -- 2.30.2