Browse Source

bug fixes for strict PHP

spficklin 11 years ago
parent
commit
9c92baa0c2
2 changed files with 5 additions and 0 deletions
  1. 3 0
      tripal_core/api/tripal_core_chado.api.inc
  2. 2 0
      tripal_feature/tripal_feature.module

+ 3 - 0
tripal_core/api/tripal_core_chado.api.inc

@@ -2160,6 +2160,9 @@ function tripal_core_expand_chado_vars($object, $type, $to_expand, $table_option
               $object->expanded = $to_expand;
             }
             else {
+              if (!is_object($object->{$foreign_table})) {
+                $object->{$foreign_table} = new stdClass();
+              }
               $object->{$foreign_table} = $foreign_object;
               $object->expanded = $to_expand;
             }

+ 2 - 0
tripal_feature/tripal_feature.module

@@ -1250,6 +1250,8 @@ function tripal_feature_load_featureloc_sequences($feature_id, $featurelocs) {
       // copy over the results to the relationship object.  Since there can
       // be more than one feature location for each relationship feature we
       // use the '$src' variable to keep track of these.
+      $rel->featurelocs = new stdClass();
+      $rel->featurelocs->$src = new stdClass();
       $rel->featurelocs->$src->src_uniquename = $rel_featureloc->src_uniquename;
       $rel->featurelocs->$src->src_cvterm_id  = $rel_featureloc->src_cvterm_id;
       $rel->featurelocs->$src->src_cvname     = $rel_featureloc->src_cvname;