Skip to content

Commit

Permalink
CO: only push in csv export column present in headers
Browse files Browse the repository at this point in the history
  • Loading branch information
aleeks committed Sep 8, 2017
1 parent 6b4a436 commit 280687e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/PrestaShopBundle/Component/CsvResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class CsvResponse extends StreamedResponse
/**
* @var int Default limit
*/
private $limit = 100;
private $limit = 1000;

/**
* Constructor.
Expand Down Expand Up @@ -212,9 +212,9 @@ private function processDataCallback()
foreach ($data as $line) {
$lineData = array();

foreach ($line as $column => $value) {
if (array_key_exists($column, $this->headersData)) {
$lineData[] = $value;
foreach (array_keys($this->headersData) as $column) {
if (array_key_exists($column, $line)) {
$lineData[] = $line[$column];
}
}

Expand Down

0 comments on commit 280687e

Please sign in to comment.