From 6943aaec026350132f40c57aab262bd066a8fd18 Mon Sep 17 00:00:00 2001
From: Daniel Wehner <daniel.wehner@erdfisch.de>
Date: Sun, 14 Oct 2012 10:11:37 +0200
Subject: [PATCH] Fix the Field API handler test.

---
 lib/Drupal/views/Tests/Field/HandlerFieldFieldTest.php | 2 +-
 views.module                                           | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/Drupal/views/Tests/Field/HandlerFieldFieldTest.php b/lib/Drupal/views/Tests/Field/HandlerFieldFieldTest.php
index a73806242340..89c2baa7c032 100644
--- a/lib/Drupal/views/Tests/Field/HandlerFieldFieldTest.php
+++ b/lib/Drupal/views/Tests/Field/HandlerFieldFieldTest.php
@@ -55,7 +55,7 @@ protected function setUp() {
         $edit[$this->fields[3]['field_name']][LANGUAGE_NOT_SPECIFIED][$j]['value'] = $this->randomName(8);
       }
       // Set this field to be empty.
-      $edit[$this->fields[4]['field_name']] = array();
+      $edit[$this->fields[4]['field_name']] = array(LANGUAGE_NOT_SPECIFIED => array(0 => array('value' => NULL)));
 
       $this->nodes[$i] = $this->drupalCreateNode($edit);
     }
diff --git a/views.module b/views.module
index 8f5b877ecf0e..1b3ec2e2a463 100644
--- a/views.module
+++ b/views.module
@@ -2249,7 +2249,7 @@ function _field_view_formatter_options($field_type = NULL) {
     $field_types = field_info_field_types();
     $options = array();
     foreach (field_info_formatter_types() as $name => $formatter) {
-      foreach ($formatter['field types'] as $formatter_field_type) {
+      foreach ($formatter['field_types'] as $formatter_field_type) {
         // Check that the field type exists.
         if (isset($field_types[$formatter_field_type])) {
           $options[$formatter_field_type][$name] = $formatter['label'];
-- 
GitLab