diff --git a/DB/DataObject.php b/DB/DataObject.php index 31aa76822..c59656469 100644 --- a/DB/DataObject.php +++ b/DB/DataObject.php @@ -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 ";