Browse Source

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

Lacey Sanderson 7 years ago
parent
commit
c1afa0cb3e

+ 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) {