diff --git a/src/Export/ExportCsv.php b/src/Export/ExportCsv.php index eecbc7f3..945a13ba 100644 --- a/src/Export/ExportCsv.php +++ b/src/Export/ExportCsv.php @@ -46,7 +46,11 @@ private function getExportCallback( array $data, DataGrid $grid ) use ($name, $outputEncoding, $delimiter, $includeBom): void { - $columns = $this->getColumns() ?? $this->grid->getColumns(); + $columns = $this->getColumns(); + + if ($columns === []) { + $columns = $this->grid->getColumns(); + } $csvDataModel = new CsvDataModel($data, $columns, $this->grid->getTranslator());