diff options
-rwxr-xr-x | include/dba/dba_driver.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/dba/dba_driver.php b/include/dba/dba_driver.php index f6091f6e1..17f87010a 100755 --- a/include/dba/dba_driver.php +++ b/include/dba/dba_driver.php @@ -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 |