From e8bca38daf26aafbc6edff72d012372557e983b3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 14 Jun 2014 13:41:15 +0200 Subject: [PATCH] Fix: syntax error --- htdocs/projet/class/project.class.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php index 1186de5e4ad..77591686983 100644 --- a/htdocs/projet/class/project.class.php +++ b/htdocs/projet/class/project.class.php @@ -83,6 +83,8 @@ class Project extends CommonObject $error = 0; $ret = 0; + $now=dol_now(); + // Check parameters if (!trim($this->ref)) { @@ -113,9 +115,9 @@ class Project extends CommonObject $sql.= ", " . $user->id; $sql.= ", 0"; $sql.= ", " . ($this->public ? 1 : 0); - $sql.= ", " . $this->db->idate(dol_now()); - $sql.= ", " . ($this->date_start != '' ? $this->db->idate($this->date_start) : 'null'); - $sql.= ", " . ($this->date_end != '' ? $this->db->idate($this->date_end) : 'null'); + $sql.= ", '".$this->db->idate($now)."'"; + $sql.= ", " . ($this->date_start != '' ? "'".$this->db->idate($this->date_start)."'" : 'null'); + $sql.= ", " . ($this->date_end != '' ? "'".$this->db->idate($this->date_end)."'" : 'null'); $sql.= ", ".$conf->entity; $sql.= ")";