Skip to content
Snippets Groups Projects
Commit 8dd3f25f authored by Pieter Frenssen's avatar Pieter Frenssen Committed by Pablo López
Browse files

Issue #3449100: Not possible to disable all entity types or bundles in settings form

parent 0a1cd56b
Branches 2.0.x
No related tags found
1 merge request!10Do not accidentally allow all entity types or bundles when none are enabled.
Pipeline #503662 failed
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment