Skip to content

Commit

Permalink
FIX Use DataColumns content when available in CSV export
Browse files Browse the repository at this point in the history
Fix #9248 broke #9173 by accidentally checking for a string key in a
numerically indexed array. Change the check to search the array instead
(fixes #10308)
  • Loading branch information
sig-steve committed May 10, 2022
1 parent 35d5f16 commit 5121a9c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Forms/GridField/GridFieldExportButton.php
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ public function generateExportFileData($gridField)
}

$value = $columnHeader($relObj);
} elseif ($gridFieldColumnsComponent && array_key_exists($columnSource, $columnsHandled ?? [])) {
} elseif ($gridFieldColumnsComponent && in_array($columnSource, $columnsHandled ?? [])) {
$value = strip_tags(
$gridFieldColumnsComponent->getColumnContent($gridField, $item, $columnSource) ?? ''
);
Expand Down

0 comments on commit 5121a9c

Please sign in to comment.