From 1493ea37fa1f483d401748eefbc008c418939641 Mon Sep 17 00:00:00 2001 From: eileen Date: Mon, 25 Nov 2019 17:57:39 +1300 Subject: [PATCH] Call makeCSVTable function directly from writeRows --- CRM/Export/BAO/ExportProcessor.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/CRM/Export/BAO/ExportProcessor.php b/CRM/Export/BAO/ExportProcessor.php index fce1247c2a..31ad915d3e 100644 --- a/CRM/Export/BAO/ExportProcessor.php +++ b/CRM/Export/BAO/ExportProcessor.php @@ -2360,15 +2360,15 @@ LIMIT $offset, $limit } /** + * Write rows to the csv. + * * @param array $headerRows - * @param array $componentDetails + * @param array $rows */ - protected function writeRows(array $headerRows, array $componentDetails) { - CRM_Core_Report_Excel::writeCSVFile($this->getExportFileName(), - $headerRows, - $componentDetails, - FALSE - ); + protected function writeRows(array $headerRows, array $rows) { + if (!empty($rows)) { + CRM_Core_Report_Excel::makeCSVTable($headerRows, $rows, FALSE); + } } /** -- 2.25.1