Skip to content

Commit

Permalink
Merge pull request #322 from seamuslee001/fix_brackets
Browse files Browse the repository at this point in the history
Fix brackets in DataObject
  • Loading branch information
seamuslee001 authored Apr 28, 2021
2 parents d9afb8a + 2e8ca16 commit 0ccb91e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 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 @@ -1185,7 +1185,7 @@ function insert()
// DATE is empty... on a col. that can be null..
// Also useful for MYSQLTIMESTAMP to stop NO_ZERO_DATE errors
if (!$this->$k &&
(($v & DB_DATAOBJECT_DATE) || (($v & DB_DATAOBJECT_TIME) || ($v & DB_DATAOBJECT_MYSQLTIMESTAMP))) &&
(($v & DB_DATAOBJECT_DATE) || ($v & DB_DATAOBJECT_TIME) || ($v & DB_DATAOBJECT_MYSQLTIMESTAMP)) &&
!($v & DB_DATAOBJECT_NOTNULL)) {

$rightq .= " NULL ";
Expand Down

0 comments on commit 0ccb91e

Please sign in to comment.