From d2a07b10478ddc57d798e9c96f057973e6e4de68 Mon Sep 17 00:00:00 2001 From: Will Rossiter Date: Tue, 27 Aug 2019 11:37:21 +1200 Subject: [PATCH] FIX Remove error when exporting a column that is not displayed in a GridField --- src/Forms/GridField/GridFieldDataColumns.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Forms/GridField/GridFieldDataColumns.php b/src/Forms/GridField/GridFieldDataColumns.php index c8dd223da..3c6d49afc 100644 --- a/src/Forms/GridField/GridFieldDataColumns.php +++ b/src/Forms/GridField/GridFieldDataColumns.php @@ -154,7 +154,7 @@ class GridFieldDataColumns implements GridField_ColumnProvider { // Find the data column for the given named column $columns = $this->getDisplayFields($gridField); - $columnInfo = $columns[$columnName]; + $columnInfo = array_key_exists($columnName, $columns) ? $columns[$columnName] : null; // Allow callbacks if (is_array($columnInfo) && isset($columnInfo['callback'])) {