translate null_date on all db fields
This commit is contained in:
parent
56f66ce001
commit
ac6c43b5fb
@ -260,6 +260,12 @@ function dbg($state) {
|
||||
*/
|
||||
function dbesc($str) {
|
||||
|
||||
if(ACTIVE_DBTYPE == DBTYPE_POSTGRES && $str == '0000-00-00 00:00:00') {
|
||||
$str = NULL_DATE;
|
||||
} else if(ACTIVE_DBTYPE != DBTYPE_POSTGRES && $str == '0001-01-01 00:00:00') {
|
||||
$str = NULL_DATE;
|
||||
}
|
||||
|
||||
if(\DBA::$dba && \DBA::$dba->connected)
|
||||
return(\DBA::$dba->escape($str));
|
||||
else
|
||||
|
Reference in New Issue
Block a user