18 lines
1.1 KiB
Diff
18 lines
1.1 KiB
Diff
diff --git a/core/lib/Drupal/Core/Config/ConfigImporter.php b/core/lib/Drupal/Core/Config/ConfigImporter.php
|
|
index 1b590d3..6b5cead 100644
|
|
--- a/core/lib/Drupal/Core/Config/ConfigImporter.php
|
|
+++ b/core/lib/Drupal/Core/Config/ConfigImporter.php
|
|
@@ -981,8 +981,10 @@ protected function checkOp($collection, $op, $name) {
|
|
$entity_storage = $this->configManager->getEntityTypeManager()->getStorage($entity_type_id);
|
|
$entity_type = $this->configManager->getEntityTypeManager()->getDefinition($entity_type_id);
|
|
$entity = $entity_storage->load($entity_storage->getIDFromConfigName($name, $entity_type->getConfigPrefix()));
|
|
- $entity->delete();
|
|
- $this->logError($this->t('Deleted and replaced configuration entity "@name"', ['@name' => $name]));
|
|
+ if ($entity) {
|
|
+ $entity->delete();
|
|
+ $this->logError($this->t('Deleted and replaced configuration entity "@name"', ['@name' => $name]));
|
|
+ }
|
|
}
|
|
else {
|
|
$this->storageComparer->getTargetStorage($collection)->delete($name);
|