Commit 2322fb2b authored by jibran's avatar jibran Committed by jibran

Issue #2851757 by jibran, Stijn Vanhandsaeme: Database upgrade fails

parent 30ce1d39
...@@ -16,9 +16,10 @@ function dynamic_entity_reference_post_update_field_storage_dependencies() { ...@@ -16,9 +16,10 @@ function dynamic_entity_reference_post_update_field_storage_dependencies() {
$map = $entity_field_manager->getFieldMapByFieldType('dynamic_entity_reference'); $map = $entity_field_manager->getFieldMapByFieldType('dynamic_entity_reference');
foreach ($map as $entity_type_id => $info) { foreach ($map as $entity_type_id => $info) {
foreach ($info as $name => $data) { foreach ($info as $name => $data) {
$field_storage = FieldStorageConfig::loadByName($entity_type_id, $name); if ($field_storage = FieldStorageConfig::loadByName($entity_type_id, $name)) {
// Re-saving the storage object will fix the dependencies. // Re-saving the storage object will fix the dependencies.
$field_storage->save(); $field_storage->save();
}
} }
} }
} }
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