Index: modules/locale/locale.field.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/locale/locale.field.inc,v
retrieving revision 1.1
diff -u -p -r1.1 locale.field.inc
--- modules/locale/locale.field.inc	16 Oct 2009 02:04:42 -0000	1.1
+++ modules/locale/locale.field.inc	21 Oct 2009 09:33:03 -0000
@@ -52,7 +52,7 @@ function locale_field_fallback_view(&$ou
 
     // If the items array is empty then we have a missing field translation.
     // @todo: Verify this assumption.
-    if (empty($output[$field_name]['items'])) {
+    if (isset($output[$field_name]) && empty($output[$field_name]['items'])) {
       if (!isset($fallback_candidates)) {
         require_once DRUPAL_ROOT . '/includes/language.inc';
         $fallback_candidates = language_fallback_get_candidates();
Index: modules/locale/locale.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/locale/locale.test,v
retrieving revision 1.48
diff -u -p -r1.48 locale.test
--- modules/locale/locale.test	17 Oct 2009 05:50:28 -0000	1.48
+++ modules/locale/locale.test	21 Oct 2009 13:06:06 -0000
@@ -1634,12 +1634,6 @@ class LocaleMultilingualFieldsFunctional
 
   function setUp() {
     parent::setUp('locale');
-  }
-
-  /**
-   * Test if field languages are correctly set through the node form.
-   */
-  function testMultilingualNodeForm() {
     // Setup users.
     $admin_user = $this->drupalCreateUser(array('administer languages', 'administer content types', 'access administration pages', 'create page content', 'edit own page content'));
     $this->drupalLogin($admin_user);
@@ -1656,7 +1650,12 @@ class LocaleMultilingualFieldsFunctional
     );
     $this->drupalPost('admin/structure/types/manage/page', $edit, t('Save content type'));
     $this->assertRaw(t('The content type %type has been updated.', array('%type' => 'Page')), t('Page content type has been updated.'));
+  }
 
+  /**
+   * Test if field languages are correctly set through the node form.
+   */
+  function testMultilingualNodeForm() {
     // Create page content.
     $langcode = FIELD_LANGUAGE_NONE;
     $title_key = "title[$langcode][0][value]";
@@ -1691,6 +1690,43 @@ class LocaleMultilingualFieldsFunctional
     $assert = isset($node->body['it']) && !isset($node->body['en']) && $node->body['it'][0]['value'] == $body_value;
     $this->assertTrue($assert, t('Field language correctly changed.'));
   }
+  
+  /*
+   * Test multilingual field display settings.
+   */
+  function testMultilingualDisplaySettings() {
+    // Create page content.
+    $langcode = FIELD_LANGUAGE_NONE;
+    $title_key = "title[$langcode][0][value]";
+    $title_value = $this->randomName(8);
+    $body_key = "body[$langcode][0][value]";
+    $body_value = $this->randomName(16);
+
+    // Create node to edit.
+    $edit = array();
+    $edit[$title_key] = $title_value;
+    $edit[$body_key] = $body_value;
+    $edit['language'] = 'en';
+    $this->drupalPost('node/add/page', $edit, t('Save'));
+    
+    // Check that the node exists in the database.
+    $node = $this->drupalGetNodeByTitle($edit[$title_key]);
+    $this->assertTrue($node, t('Node found in database.'));
+    
+    // Check if node body is showed.
+    $this->drupalGet("node/$node->nid");
+    $body_xpath = '//div[@id="node-' . $node->nid . '"]//div[@property="content:encoded"]/p';
+    $this->assertEqual(current($this->xpath($body_xpath)), $node->body['en'][0]['value'], 'Node body is correctly showed.', 'Node');
+
+    $settings['body[full][type]'] = 'hidden';
+    $this->drupalPost('admin/structure/types/manage/page/display', $settings, t('Save'));
+    $select_xpath = '//select[@id="edit-body-full-type"]/option[@selected="selected"]';
+    // Check if body display is actually "hidden" for the "full" build mode.
+    $this->assertEqual(current($this->xpath($select_xpath)), '<Hidden>', 'Body display is actually "hidden" for the "full" build mode');
+    $this->drupalGet("node/$node->nid");
+    // Check if node body is not showed.
+    $this->assertFalse(is_array($this->xpath($body_xpath)), 'Body correctly not showed.');
+  }
 }
 
 /**
