From eab68b083a5f09ab81007f941cc9566841ba393f 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 | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/CRM/Core/Report/Excel.php b/CRM/Core/Report/Excel.php index 096ae050fcf1..d602a8762dfc 100644 --- a/CRM/Core/Report/Excel.php +++ b/CRM/Core/Report/Excel.php @@ -157,18 +157,17 @@ public function writeHTMLFile($fileName, $header, $rows, $titleHeader = NULL, $o * * @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); } }