Skip to content

Commit

Permalink
check if bundle is empty before creating base field definition (eilee…
Browse files Browse the repository at this point in the history
  • Loading branch information
jackrabbithanna authored and puresyntax71 committed Jan 9, 2025
1 parent e2b41bc commit 0e9b470
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion civicrm_entity.module
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ function civicrm_entity_entity_bundle_field_info(EntityTypeInterface $entity_typ
// Ensure all fields have a definition.
if ($entity_type->get('civicrm_entity_ui_exposed') && $entity_type->hasKey('bundle')) {
foreach ($base_field_definitions as $field_name => $definition) {
if (isset($result[$field_name]) || isset($definition)) {
if (isset($result[$field_name]) || isset($definition) || empty($bundle)) {
continue;
}
$field = BaseFieldOverride::createFromBaseFieldDefinition($base_field_definitions[$field_name], $bundle);
Expand Down

0 comments on commit 0e9b470

Please sign in to comment.