Browse Source

Merge pull request #1172 from tripal/1071-tv3-chado_record_bug

ChadoRecord class bug
Stephen Ficklin 4 years ago
parent
commit
ec877e1776
1 changed files with 2 additions and 2 deletions
  1. 2 2
      tripal_chado/api/ChadoRecord.inc

+ 2 - 2
tripal_chado/api/ChadoRecord.inc

@@ -391,7 +391,7 @@ class ChadoRecord {
         continue;
       }
 
-      if ($value == '__NULL__') {
+      if ($value === '__NULL__') {
         $sql .= $column . ' = NULL, ';
       }
       else {
@@ -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".',
         [