From: eileen Date: Mon, 30 Jul 2018 11:11:48 +0000 (+1200) Subject: Export - don't pass arrays as reference when they are not changed X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=610f72e16f046ecfeabd0bdafe2137e2fda2cd9e;p=civicrm-core.git Export - don't pass arrays as reference when they are not changed --- diff --git a/CRM/Export/BAO/Export.php b/CRM/Export/BAO/Export.php index c6bd9c9279..3db3c72f98 100644 --- a/CRM/Export/BAO/Export.php +++ b/CRM/Export/BAO/Export.php @@ -796,7 +796,7 @@ INSERT INTO {$componentTable} SELECT distinct gc.contact_id FROM civicrm_group_c * @param $details * @param $sqlColumns */ - public static function writeDetailsToTable($tableName, &$details, &$sqlColumns) { + public static function writeDetailsToTable($tableName, $details, $sqlColumns) { if (empty($details)) { return; } @@ -813,10 +813,10 @@ FROM $tableName $sqlClause = array(); - foreach ($details as $dontCare => $row) { + foreach ($details as $row) { $id++; $valueString = array($id); - foreach ($row as $dontCare => $value) { + foreach ($row as $value) { if (empty($value)) { $valueString[] = "''"; } @@ -843,7 +843,7 @@ VALUES $sqlValueString * * @return string */ - public static function createTempTable(&$sqlColumns) { + public static function createTempTable($sqlColumns) { //creating a temporary table for the search result that need be exported $exportTempTable = CRM_Utils_SQL_TempTable::build()->setDurable()->setCategory('export')->getName();