Skip to content

Commit

Permalink
Merge pull request #1172 from tripal/1071-tv3-chado_record_bug
Browse files Browse the repository at this point in the history
ChadoRecord class bug
  • Loading branch information
spficklin committed Mar 6, 2021
2 parents c3b2392 + 2a34824 commit ec877e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tripal_chado/api/ChadoRecord.inc
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ class ChadoRecord {
continue;
}

if ($value == '__NULL__') {
if ($value === '__NULL__') {
$sql .= $column . ' = NULL, ';
}
else {
Expand Down Expand Up @@ -569,7 +569,7 @@ class ChadoRecord {
}

// Make sure that the value is not NULL if this is a required field.
if (in_array($column_name, $this->required_cols) and $value == '__NULL__') {
if (in_array($column_name, $this->required_cols) and $value === '__NULL__') {
$message = t('ChadoRecord::setValue(). The column named, "!column", ' .
'requires a value for the table: "!table".',
[
Expand Down

0 comments on commit ec877e1

Please sign in to comment.