diff --git a/core/modules/field/field.attach.inc b/core/modules/field/field.attach.inc
index 29ebd3b..1321130 100644
--- a/core/modules/field/field.attach.inc
+++ b/core/modules/field/field.attach.inc
@@ -522,7 +522,7 @@ function _field_invoke_multiple($op, $entity_type, $entities, &$a = NULL, &$b =
         // Unless a language code suggestion is provided we iterate on all the
         // available language codes.
         $available_langcodes = field_available_languages($entity_type, $field);
-        $langcode = !empty($options['langcode'][$id]) ? $options['langcode'][$id] : $options['langcode'];
+        $langcode = is_array($options['langcode']) && !empty($options['langcode'][$id]) ? $options['langcode'][$id] : $options['langcode'];
         $langcodes = _field_language_suggestion($available_langcodes, $langcode, $field_name);
         foreach ($langcodes as $langcode) {
           $grouped_items[$field_id][$langcode][$id] = isset($entity->{$field_name}[$langcode]) ? $entity->{$field_name}[$langcode] : array();
diff --git a/core/modules/translation_entity/lib/Drupal/translation_entity/EntityTranslationController.php b/core/modules/translation_entity/lib/Drupal/translation_entity/EntityTranslationController.php
index 26a2699..9a86764 100644
--- a/core/modules/translation_entity/lib/Drupal/translation_entity/EntityTranslationController.php
+++ b/core/modules/translation_entity/lib/Drupal/translation_entity/EntityTranslationController.php
@@ -242,7 +242,7 @@ public function entityFormAlter(array &$form, array &$form_state, EntityInterfac
         );
       }
 
-      if ($language_widget) {
+      if ($language_widget && is_array($form_langcode)) {
         $form_langcode['#multilingual'] = TRUE;
       }
 
