Browse Source

Fixed bug I think introduced through merge conflicts and an annoying missing index warning

Stephen Ficklin 6 years ago
parent
commit
0402025787
2 changed files with 4 additions and 3 deletions
  1. 2 1
      tripal/api/tripal.terms.api.inc
  2. 2 2
      tripal/includes/TripalEntityController.inc

+ 2 - 1
tripal/api/tripal.terms.api.inc

@@ -795,7 +795,8 @@ function tripal_get_term_lookup_form_result($form, $form_state, $field_name = ''
   $values = array();
   $selected = array();
   if ($field_name) {
-    if (array_key_exists('term_match', $form_state['values'][$field_name]['und'][$delta])) {
+    if (array_key_exists('term_match', $form_state['values'][$field_name]['und'][$delta]) and 
+      array_key_exists('terms_list', $form_state['values'][$field_name]['und'][$delta]['term_match'])) {
       $values = $form_state['values'][$field_name]['und'][$delta]['term_match']['terms_list'];
     }
   }

+ 2 - 2
tripal/includes/TripalEntityController.inc

@@ -112,9 +112,9 @@ class TripalEntityController extends EntityAPIController {
     // If no title was supplied then we should try to generate one using the
     // default format set by admins.
     if (!$title) {     
-      $title = tripal_get_title_format($bundle_entity);
+      $title = tripal_get_title_format($bundle);
     }
-    $title = tripal_replace_entity_tokens($title, $entity, $bundle_entity);
+    $title = tripal_replace_entity_tokens($title, $entity, $bundle);
     
     if ($title) {
       db_update('tripal_entity')