From 2576fe34c5cfc2b94fdf81e404f44b79b2c2d2a1 Mon Sep 17 00:00:00 2001 From: Erik Hommel Date: Thu, 7 Dec 2017 17:26:52 +0100 Subject: [PATCH] Fix CRM-21155 by removing batchItems entirely --- CRM/Financial/BAO/ExportFormat/CSV.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/CRM/Financial/BAO/ExportFormat/CSV.php b/CRM/Financial/BAO/ExportFormat/CSV.php index 1b3513cba1..bcb6768655 100644 --- a/CRM/Financial/BAO/ExportFormat/CSV.php +++ b/CRM/Financial/BAO/ExportFormat/CSV.php @@ -182,7 +182,6 @@ class CRM_Financial_BAO_ExportFormat_CSV extends CRM_Financial_BAO_ExportFormat $financialItems = array(); $this->_batchIds = $batchId; - $batchItems = array(); $queryResults = array(); while ($dao->fetch()) { @@ -225,14 +224,13 @@ class CRM_Financial_BAO_ExportFormat_CSV extends CRM_Financial_BAO_ExportFormat ); end($financialItems); - $batchItems[] = &$financialItems[key($financialItems)]; $queryResults[] = get_object_vars($dao); } - CRM_Utils_Hook::batchItems($queryResults, $batchItems); + CRM_Utils_Hook::batchItems($queryResults, $financialItems); - $batchItems['headers'] = self::formatHeaders($batchItems); - self::export($batchItems); + $financialItems['headers'] = self::formatHeaders($financialItems); + self::export($financialItems); } parent::initiateDownload(); } -- 2.25.1