diff --git a/core/modules/field/lib/Drupal/field/FieldInfo.php b/core/modules/field/lib/Drupal/field/FieldInfo.php index a546411..23ad2c4 100644 --- a/core/modules/field/lib/Drupal/field/FieldInfo.php +++ b/core/modules/field/lib/Drupal/field/FieldInfo.php @@ -538,12 +538,12 @@ public function getBundleExtraFields($entity_type, $bundle) { // Cache miss: read from hook_field_extra_fields(). Note: given the current // shape of the hook, we have no other way than collecting extra fields on // all bundles. - $info = array(); + $info = array('form' => array(), 'display' => array()); $extra = $this->moduleHandler->invokeAll('field_extra_fields'); drupal_alter('field_extra_fields', $extra); - // Merge in saved settings. + if (isset($extra[$entity_type][$bundle])) { - $info = $extra[$entity_type][$bundle] + array('form' => array(), 'display' => array()); + $info = $extra[$entity_type][$bundle] + $info; } // Store in the 'static' and persistent caches.