diff --git a/core/lib/Drupal/Core/Entity/ContentEntityForm.php b/core/lib/Drupal/Core/Entity/ContentEntityForm.php index 17b90c7..671b5ad 100644 --- a/core/lib/Drupal/Core/Entity/ContentEntityForm.php +++ b/core/lib/Drupal/Core/Entity/ContentEntityForm.php @@ -147,7 +147,9 @@ protected function updateFormLangcode(FormStateInterface $form_state) { // https://www.drupal.org/node/2143729. if ($form_state->hasValue('langcode') && $this->isDefaultFormLangcode($form_state)) { $langcode = $form_state->getValue('langcode'); - $langcode = isset($langcode[0]['value']) ? $langcode[0]['value'] : NULL; + if(is_array($langcode)) { + $langcode = isset($langcode[0]['value']) ? $langcode[0]['value'] : NULL; + } $form_state->set('langcode', $langcode); } }