Преглед на файлове

Bug Fix: Ensure that empty chado property fields are not rendered (now looks at formatter as well ;-P)

Lacey Sanderson преди 7 години
родител
ревизия
c1afa0cb3e
променени са 1 файла, в които са добавени 5 реда и са изтрити 0 реда
  1. 5 0
      tripal_chado/includes/TripalFields/chado_linker__prop/chado_linker__prop_formatter.inc

+ 5 - 0
tripal_chado/includes/TripalFields/chado_linker__prop/chado_linker__prop_formatter.inc

@@ -29,6 +29,11 @@ class chado_linker__prop_formatter extends ChadoFieldFormatter {
       $list[$index] = $item['value'];
     }
 
+    // Also need to make sure to not return markup if the field is empty.
+    if (empty($list)) {
+      return;
+    }
+
     // If more than one value has been found display all values in an unordered
     // list.
     if (count($list) > 1) {