checking for destroy

needed if field is passed array data rather than objects.
This commit is contained in:
John Milmine 2015-02-21 23:03:34 +13:00
parent 7c4c30270a
commit fa9cbb74ce

View File

@ -155,7 +155,9 @@ class GridFieldExportButton implements GridField_HTMLProvider, GridField_ActionP
$fileData .= "\n"; $fileData .= "\n";
} }
$item->destroy(); if ($item->hasMethod('destroy')) {
$item->destroy();
}
} }
return $fileData; return $fileData;