FIX : #5629 DoliDBPgsql::query SQL Error message: ERROR: 22P02: invalid
input syntax for integer: ""
This commit is contained in:
parent
aa17564e93
commit
0ac090e959
@ -591,6 +591,7 @@ abstract class CommonObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(! empty($id_type_contact)) {
|
||||||
$datecreate = dol_now();
|
$datecreate = dol_now();
|
||||||
|
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
@ -600,7 +601,7 @@ abstract class CommonObject
|
|||||||
$sql.= " (element_id, fk_socpeople, datecreate, statut, fk_c_type_contact) ";
|
$sql.= " (element_id, fk_socpeople, datecreate, statut, fk_c_type_contact) ";
|
||||||
$sql.= " VALUES (".$this->id.", ".$fk_socpeople." , " ;
|
$sql.= " VALUES (".$this->id.", ".$fk_socpeople." , " ;
|
||||||
$sql.= "'".$this->db->idate($datecreate)."'";
|
$sql.= "'".$this->db->idate($datecreate)."'";
|
||||||
$sql.= ", 4, '". $id_type_contact . "' ";
|
$sql.= ", 4, ". $id_type_contact . " ";
|
||||||
$sql.= ")";
|
$sql.= ")";
|
||||||
dol_syslog(get_class($this)."::add_contact", LOG_DEBUG);
|
dol_syslog(get_class($this)."::add_contact", LOG_DEBUG);
|
||||||
|
|
||||||
@ -636,6 +637,8 @@ abstract class CommonObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copy contact from one element to current
|
* Copy contact from one element to current
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user