Commit 3c94e310 authored by alexpott's avatar alexpott
Browse files

Issue #2295447 by yched: Fixed Leftover access to FieldInstanceConfig::$field.

parent baf2bbaa
......@@ -444,11 +444,11 @@ public static function postDelete(EntityStorageInterface $storage, array $instan
if (!$instance->deleted) {
$view_modes = \Drupal::entityManager()->getViewModeOptions($instance->entity_type, TRUE);
foreach (array_keys($view_modes) as $mode) {
$displays_to_update['entity_view_display'][$instance->entity_type . '.' . $instance->bundle . '.' . $mode][] = $instance->field->name;
$displays_to_update['entity_view_display'][$instance->entity_type . '.' . $instance->bundle . '.' . $mode][] = $instance->field_name;
}
$form_modes = \Drupal::entityManager()->getFormModeOptions($instance->entity_type, TRUE);
foreach (array_keys($form_modes) as $mode) {
$displays_to_update['entity_form_display'][$instance->entity_type . '.' . $instance->bundle . '.' . $mode][] = $instance->field->name;
$displays_to_update['entity_form_display'][$instance->entity_type . '.' . $instance->bundle . '.' . $mode][] = $instance->field_name;
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment