Browse Source

bug fixes for strict PHP

spficklin 11 years ago
parent
commit
2fa23ec5b4
1 changed files with 3 additions and 0 deletions
  1. 3 0
      tripal_core/api/tripal_core_chado.api.inc

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

@@ -2170,6 +2170,9 @@ function tripal_core_expand_chado_vars($object, $type, $to_expand, $table_option
           // if the object returned is NULL then handle that
           else {
             if (count($foreign_table_desc['foreign keys'][$base_table]['columns']) > 1) {
+              if (!is_object($object->{$foreign_table})) {
+                $object->{$foreign_table} = new stdClass();
+              }
               $object->{$foreign_table}->{$left} = NULL;
             }
             else {