Test if a field is returned by getCMSFields()

Should not happen unless the field was manually removed within
getCMSFields()
This commit is contained in:
colymba 2012-07-19 15:54:19 +03:00
parent 26690ba84d
commit 86e2773663
1 changed files with 4 additions and 1 deletions

View File

@ -311,7 +311,10 @@ class GridFieldBulkImageUpload_Request extends RequestHandler {
$recordEditableFieldsForms = array();
foreach ( $this->getRecordEditableFields() as $editableFieldName )
{
array_push($recordEditableFieldsForms, $this->parseFieldHTMLWithRecordID($this->getFieldEditForm($editableFieldName)->FieldHolder(), $record->ID) );
$formField = $this->getFieldEditForm($editableFieldName);
if ( $formField ) {
array_push($recordEditableFieldsForms, $this->parseFieldHTMLWithRecordID($formField->FieldHolder(), $record->ID) );
}
}
// Collect all output data.