소스 검색

Issue #702: Fix Location on Map field undefined error.

Lacey Sanderson 6 년 전
부모
커밋
6d1fd244b4
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      tripal_chado/includes/TripalFields/ogi__location_on_map/ogi__location_on_map.inc

+ 2 - 1
tripal_chado/includes/TripalFields/ogi__location_on_map/ogi__location_on_map.inc

@@ -322,10 +322,11 @@ class ogi__location_on_map extends ChadoField {
       }
     }
 
+
     // If there are no map positions expanded above then remove the stub.
     // This is needed to ensure this field isn't displayed when there are no locations.
     if (!isset($feature->featurepos->feature_id) OR (sizeof($feature->featurepos->feature_id) == 0)) {
-      unset($entity->{$field_name});
+      $entity->{$field_name}['und'][0]['value'] = array();
     }
   }