Skip to content

Commit

Permalink
Merge pull request #1291 from tripal/1088-tv3-field-error
Browse files Browse the repository at this point in the history
Issue 1088 sep__protocol check for null
  • Loading branch information
spficklin committed Aug 11, 2022
2 parents e24647d + a31c397 commit c049e28
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class sep__protocol_widget extends ChadoFieldWidget {

// If the field already has a value then it will come through the $items
// array. This happens when editing an existing record.
if (count($items) > 0 and array_key_exists($delta, $items)) {
if (count($items) > 0 and array_key_exists($delta, $items) and $items[$delta]['value']) {
$protocol_name = array_key_exists($protocol_name_term, $items[$delta]['value']) ? $items[$delta]['value'][$protocol_name_term] : $protocol_name;
}

Expand Down Expand Up @@ -100,4 +100,4 @@ class sep__protocol_widget extends ChadoFieldWidget {
public function submit($form, &$form_state, $entity_type, $entity, $langcode, $delta) {
}

}
}

0 comments on commit c049e28

Please sign in to comment.