Skip to content

Commit

Permalink
Merge pull request #321 from civicrm/5.37
Browse files Browse the repository at this point in the history
5.37
  • Loading branch information
eileenmcnaughton authored Apr 28, 2021
2 parents edc44b9 + 0ccb91e commit 109d876
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions DB/DataObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -1167,7 +1167,7 @@ function insert()
}

// CRM-14986 starts
if (($v & DB_DATAOBJECT_DATE) || ($v & DB_DATAOBJECT_TIME) || $v & DB_DATAOBJECT_MYSQLTIMESTAMP) {
if (($v & DB_DATAOBJECT_DATE) || ($v & DB_DATAOBJECT_TIME) || ($v & DB_DATAOBJECT_MYSQLTIMESTAMP)) {
if (strpos($this->$k, '-') !== FALSE) {
/*
* per CRM-14986 we have been having ongoing problems with the format returned from $dao->find(TRUE) NOT
Expand All @@ -1183,9 +1183,9 @@ function insert()
// CRM-14986 ends

// DATE is empty... on a col. that can be null..
// note: this may be usefull for time as well..
// Also useful for MYSQLTIMESTAMP to stop NO_ZERO_DATE errors
if (!$this->$k &&
(($v & DB_DATAOBJECT_DATE) || ($v & DB_DATAOBJECT_TIME)) &&
(($v & DB_DATAOBJECT_DATE) || ($v & DB_DATAOBJECT_TIME) || ($v & DB_DATAOBJECT_MYSQLTIMESTAMP)) &&
!($v & DB_DATAOBJECT_NOTNULL)) {

$rightq .= " NULL ";
Expand Down

0 comments on commit 109d876

Please sign in to comment.