summaryrefslogtreecommitdiffstats
path: root/core/modules/content_translation/content_translation.module
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/content_translation/content_translation.module')
-rw-r--r--core/modules/content_translation/content_translation.module2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/modules/content_translation/content_translation.module b/core/modules/content_translation/content_translation.module
index 466b848..7ca20d4 100644
--- a/core/modules/content_translation/content_translation.module
+++ b/core/modules/content_translation/content_translation.module
@@ -291,7 +291,7 @@ function content_translation_form_alter(array &$form, FormStateInterface $form_s
// Handle fields shared between translations when there is at least one
// translation available or a new one is being created.
if (!$entity->isNew() && (!isset($translations[$form_langcode]) || count($translations) > 1)) {
- $langcode_key = $entity->getEntityType()->getKey('langcode') ?: 'langcode';
+ $langcode_key = $entity->getEntityType()->getKey('langcode');
foreach ($entity->getFieldDefinitions() as $field_name => $definition) {
if (isset($form[$field_name]) && $field_name != $langcode_key) {
$form[$field_name]['#multilingual'] = $definition->isTranslatable();