Merge pull request #1 from dennis2society/dennis2society-csv_whitespace_column_fix

Ignore CSV labels with a whitespace
This commit is contained in:
Dennis Lübke authored and GitHub committed 2023-02-01 12:33:00 +01:00
commit 57ed8e06e3
1 file changed
+1 -1
+1 -1
View File
@@ -120,7 +120,7 @@ if (safeget('output') == 'csv') {
$columns = array();
foreach ($handler->getStruct() as $key => $field) {
$label = trim($field['label']);
if ($field['display_in_list'] && $label != '') { # don't show fields without a label
if ($field['display_in_list'] && $label != '' && $label != ' ') { # don't show fields without a label and those with a whitespace
$header[] = html_entity_decode($label, ENT_COMPAT | ENT_HTML401, 'UTF-8');
$columns[] = $key;
}