소스 검색

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