Skip to content
Snippets Groups Projects
Unverified Commit 7021c47c authored by Richard Papp's avatar Richard Papp Committed by Lucas Hedding
Browse files

Issue #3106135 by boromino, colan, heddn: Undefined index: #entity_type in...

Issue #3106135 by boromino, colan, heddn: Undefined index: #entity_type in Drupal\conditional_fields\ConditionalFieldsFormHelper::dependentValidate() (line 331
parent baa443c8
No related branches found
No related tags found
No related merge requests found
......@@ -400,6 +400,7 @@ class ConditionalFieldsFormHelper {
return;
}
$entity_type_id = $form_state->getFormObject()->getEntity()->getEntityTypeId();
$dependent = $form['#conditional_fields'][reset($element['#array_parents'])];
// Check if this field's dependencies were triggered.
......@@ -423,7 +424,7 @@ class ConditionalFieldsFormHelper {
}
$input_state = (is_null($input_state)) ? [] : $input_state;
if (isset($dependent['field_parents'][0])) {
$field = FieldStorageConfig::loadByName($form['#entity_type'], $dependent['field_parents'][0]);
$field = FieldStorageConfig::loadByName($entity_type_id, $dependent['field_parents'][0]);
}
else {
$field = NULL;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment