diff --git a/core/modules/translation_entity/lib/Drupal/translation_entity/FieldTranslationSynchronizer.php b/core/modules/translation_entity/lib/Drupal/translation_entity/FieldTranslationSynchronizer.php index c75a048..8862c6a 100644 --- a/core/modules/translation_entity/lib/Drupal/translation_entity/FieldTranslationSynchronizer.php +++ b/core/modules/translation_entity/lib/Drupal/translation_entity/FieldTranslationSynchronizer.php @@ -41,9 +41,7 @@ public function synchronizeFields(EntityInterface $entity, $sync_langcode, $orig // If the entity language is being changed there is nothing to synchronize. $entity_type = $entity->entityType(); - // @todo Use the entity storage controller directly to avoid accessing the - // global scope. - $entity_unchanged = isset($entity->original) ? $entity->original : $this->entityManager->getStorageController($entity->entityType())->loadUnchanged($entity->id()); + $entity_unchanged = isset($entity->original) ? $entity->original : $this->entityManager->getStorageController($entity_type)->loadUnchanged($entity->id()); if ($entity->language()->langcode != $entity_unchanged->language()->langcode) { return; }