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 929d491..c6ebff5 100644 --- a/core/modules/translation_entity/lib/Drupal/translation_entity/FieldTranslationSynchronizer.php +++ b/core/modules/translation_entity/lib/Drupal/translation_entity/FieldTranslationSynchronizer.php @@ -95,7 +95,9 @@ public function synchronizeFields(EntityInterface $entity, $sync_langcode, $orig * {@inheritdoc} */ public function synchronizeItems(EntityInterface $entity, $field_name, FieldInterface $unchanged_items, $sync_langcode, array $translations, array $columns) { - $source_items = $entity->getTranslation($sync_langcode)->{$field_name}; + // Clone the object, since we are going to access the values after writing + // to the entity. + $source_items = clone $entity->getTranslation($sync_langcode)->{$field_name}; // Make sure we can detect any change in the source items. $change_map = array(); @@ -194,7 +196,7 @@ public function synchronizeItems(EntityInterface $entity, $field_name, FieldInte /** * Computes a hash code for the specified item. * - * @param array $items + * @param \Drupal\Core\Entity\Field\FieldInterface $items * An array of field items. * @param integer $delta * The delta identifying the item to be processed.