Merge pull request #9197 from wilr/pulls/gridfield-columnlookup

FIX Remove error when exporting a column that is not displayed in a GridField
This commit is contained in:
Robbie Averill 2019-08-27 13:59:48 +12:00 committed by GitHub
commit e078eea7dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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'])) {