Commit 9af697c5 authored by catch's avatar catch

Issue #3082289 by Krzysztof Domański, alexpott:...

Issue #3082289 by Krzysztof Domański, alexpott: \Drupal\Core\Field\Plugin\Field\FieldType\EntityReferenceItem::onDependencyRemoval() sets auto_create to an invalid data type
parent 9409b51a
......@@ -551,7 +551,7 @@ public static function onDependencyRemoval(FieldDefinitionInterface $field_defin
// setting, disable the auto-creation feature completely.
$auto_create_bundle = !empty($handler_settings['auto_create_bundle']) ? $handler_settings['auto_create_bundle'] : FALSE;
if ($auto_create_bundle && $auto_create_bundle == $bundle->id()) {
$handler_settings['auto_create'] = NULL;
$handler_settings['auto_create'] = FALSE;
$handler_settings['auto_create_bundle'] = NULL;
}
......
......@@ -335,7 +335,7 @@ public function testMultipleTargetBundles() {
// should be reset (no auto-creation).
$vocabularies[1]->delete();
$field_config = FieldConfig::load($field_id);
$this->assertFalse($field_config->getSetting('handler_settings')['auto_create']);
$this->assertSame(FALSE, $field_config->getSetting('handler_settings')['auto_create']);
$this->assertFalse(isset($field_config->getSetting('handler_settings')['auto_create_bundle']));
}
......
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