Skip to content

Commit

Permalink
Merge pull request #12596 from eileenmcnaughton/export_ref
Browse files Browse the repository at this point in the history
[NFC] Export - don't pass arrays as reference when they are not changed
  • Loading branch information
eileenmcnaughton authored Jul 30, 2018
2 parents 771c671 + 610f72e commit 315dbc2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions CRM/Export/BAO/Export.php
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,7 @@ public static function sqlColumnDefn($processor, &$sqlColumns, $field) {
* @param $details
* @param $sqlColumns
*/
public static function writeDetailsToTable($tableName, &$details, &$sqlColumns) {
public static function writeDetailsToTable($tableName, $details, $sqlColumns) {
if (empty($details)) {
return;
}
Expand All @@ -813,10 +813,10 @@ public static function writeDetailsToTable($tableName, &$details, &$sqlColumns)

$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[] = "''";
}
Expand All @@ -843,7 +843,7 @@ public static function writeDetailsToTable($tableName, &$details, &$sqlColumns)
*
* @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();

Expand Down

0 comments on commit 315dbc2

Please sign in to comment.