Anthony Bretaudeau преди 7 години
родител
ревизия
8200c41fae

+ 1 - 1
tripal_chado/includes/TripalFields/schema__publication/schema__publication_formatter.inc

@@ -19,7 +19,7 @@ class schema__publication_formatter extends ChadoFieldFormatter {
 
       $title = isset($item['value']['TPUB:0000039']) ? $item['value']['TPUB:0000039'] : '';
       $citation = isset($item['value']['TPUB:0000003']) ? $item['value']['TPUB:0000003'] : '';
-      $entity = array_key_exists('entity', $item['value']) ? $item['value']['entity'] : '';
+      $entity = (is_array($item['value']) && array_key_exists('entity', $item['value'])) ? $item['value']['entity'] : '';
       if ($entity) {
         list($entity_type, $entity_id) = explode(':', $entity);
         $new_title = l($title, 'bio_data/' . $entity_id);

+ 1 - 1
tripal_chado/includes/TripalFields/sio__annotation/sio__annotation_formatter.inc

@@ -28,7 +28,7 @@ class sio__annotation_formatter extends ChadoFieldFormatter {
     $chado_table = $this->instance['settings']['chado_table'];
     foreach ($items as $delta => $item) {
 
-      if ($item['chado-' . $chado_table . '__cvterm_id']) {
+      if (!empty($item['chado-' . $chado_table . '__cvterm_id'])) {
         $cvterm = chado_generate_var('cvterm', array('cvterm_id' => $item['chado-' . $chado_table . '__cvterm_id']));
         $dbxref = $cvterm->dbxref_id;