diff --git a/core/modules/language/src/Entity/ContentLanguageSettings.php b/core/modules/language/src/Entity/ContentLanguageSettings.php index e9a7854..2dca159 100644 --- a/core/modules/language/src/Entity/ContentLanguageSettings.php +++ b/core/modules/language/src/Entity/ContentLanguageSettings.php @@ -9,6 +9,7 @@ use Drupal\Core\Config\Entity\ConfigEntityBase; use Drupal\Core\Config\Entity\ThirdPartySettingsTrait; +use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\EntityStorageInterface; use Drupal\Core\Language\LanguageInterface; use Drupal\language\ContentLanguageSettingsInterface; @@ -156,7 +157,9 @@ public function calculateDependencies() { // If the target entity type uses entities to manage its bundles then // depend on the bundle entity. $bundle_entity = $this->entityManager()->getStorage($bundle_entity_type_id)->load($this->target_bundle); - $this->addDependency('config', $bundle_entity->getConfigDependencyName()); + if ($bundle_entity instanceof EntityInterface) { + $this->addDependency('config', $bundle_entity->getConfigDependencyName()); + } } return $this->dependencies; }