check datatype to be sure
This commit is contained in:
parent
ac6c43b5fb
commit
dab3495751
@ -260,9 +260,9 @@ function dbg($state) {
|
||||
*/
|
||||
function dbesc($str) {
|
||||
|
||||
if(ACTIVE_DBTYPE == DBTYPE_POSTGRES && $str == '0000-00-00 00:00:00') {
|
||||
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') {
|
||||
} else if(ACTIVE_DBTYPE != DBTYPE_POSTGRES && $str === '0001-01-01 00:00:00') {
|
||||
$str = NULL_DATE;
|
||||
}
|
||||
|
||||
@ -280,9 +280,9 @@ function dbunescbin($str) {
|
||||
}
|
||||
|
||||
function dbescdate($date) {
|
||||
if(ACTIVE_DBTYPE == DBTYPE_POSTGRES && $date == '0000-00-00 00:00:00') {
|
||||
if(ACTIVE_DBTYPE == DBTYPE_POSTGRES && $date === '0000-00-00 00:00:00') {
|
||||
$date = NULL_DATE;
|
||||
} else if(ACTIVE_DBTYPE != DBTYPE_POSTGRES && $date == '0001-01-01 00:00:00') {
|
||||
} else if(ACTIVE_DBTYPE != DBTYPE_POSTGRES && $date === '0001-01-01 00:00:00') {
|
||||
$date = NULL_DATE;
|
||||
}
|
||||
return $date;
|
||||
|
Reference in New Issue
Block a user