From c93c1383176a472fede11466604b80490ec5a7ba Mon Sep 17 00:00:00 2001 From: eileen Date: Mon, 25 Nov 2019 17:59:17 +1300 Subject: [PATCH] Remove outputHeader as a param for writeCSVFile as it is always true --- CRM/Core/Report/Excel.php | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/CRM/Core/Report/Excel.php b/CRM/Core/Report/Excel.php index 096ae050fcf1..52782e8132ac 100644 --- a/CRM/Core/Report/Excel.php +++ b/CRM/Core/Report/Excel.php @@ -152,23 +152,20 @@ public function writeHTMLFile($fileName, $header, $rows, $titleHeader = NULL, $o * An array of the headers. * @param array $rows * An array of arrays of the table contents. - * @param bool $outputHeader - * Should we output the header row. * * @return void */ - public static function writeCSVFile($fileName, $header, $rows, $outputHeader = TRUE) { - if ($outputHeader) { - CRM_Utils_System::download(CRM_Utils_String::munge($fileName), - 'text/x-csv', - CRM_Core_DAO::$_nullObject, - 'csv', - FALSE - ); - } + public static function writeCSVFile($fileName, $header, $rows) { + $null = NULL; + CRM_Utils_System::download(CRM_Utils_String::munge($fileName), + 'text/x-csv', + $null, + 'csv', + FALSE + ); if (!empty($rows)) { - return self::makeCSVTable($header, $rows, $outputHeader); + return self::makeCSVTable($header, $rows, TRUE); } }