Skip to content
Snippets Groups Projects
Commit e8ffb0da authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Fix: sql error on editing project with pgsql.

Fix: Error management on project edit.
parent bf9ec22c
No related branches found
No related tags found
No related merge requests found
......@@ -204,9 +204,9 @@ class Project extends CommonObject
$sql.= ", fk_soc = " . ($this->socid > 0 ? $this->socid : "null");
$sql.= ", fk_statut = " . $this->statut;
$sql.= ", public = " . ($this->public ? 1 : 0);
$sql.= ", datec=" . ($this->date_c != '' ? $this->db->idate($this->date_c) : 'null');
$sql.= ", dateo=" . ($this->date_start != '' ? $this->db->idate($this->date_start) : 'null');
$sql.= ", datee=" . ($this->date_end != '' ? $this->db->idate($this->date_end) : 'null');
$sql.= ", datec=" . ($this->date_c != '' ? "'".$this->db->idate($this->date_c)."'" : 'null');
$sql.= ", dateo=" . ($this->date_start != '' ? "'".$this->db->idate($this->date_start)."'" : 'null');
$sql.= ", datee=" . ($this->date_end != '' ? "'".$this->db->idate($this->date_end)."'" : 'null');
$sql.= " WHERE rowid = " . $this->id;
dol_syslog(get_class($this)."::Update sql=" . $sql, LOG_DEBUG);
......@@ -262,6 +262,7 @@ class Project extends CommonObject
else
{
$this->error = $this->db->lasterror();
$this->errors[] = $this->error;
dol_syslog(get_class($this)."::Update error -2 " . $this->error, LOG_ERR);
$result = -2;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment