Skip to content
Snippets Groups Projects

Do not accidentally allow all entity types or bundles when none are enabled.

1 file
+ 2
2
Compare changes
  • Side-by-side
  • Inline
+ 2
2
@@ -147,14 +147,14 @@ function field_inheritance_form_alter(&$form, FormStateInterface $form_state, $f
$included_entities = $config->get('included_entities');
$included_bundles = $config->get('included_bundles');
if (!empty($included_entities)) {
if ($included_entities !== NULL) {
$included_entities = explode(',', $included_entities);
if (array_search($entity_type, $included_entities) === FALSE) {
return;
}
}
if (!empty($included_bundles)) {
if ($included_bundles !== NULL) {
$included_bundles = explode(',', $included_bundles);
if (array_search($entity_type . ':' . $bundle, $included_bundles) === FALSE) {
return;
Loading