From fb59b5c69ab4c3b032fa4ca5a3e68f7fb3c2cfe9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 15 Apr 2012 19:20:39 +0200 Subject: [PATCH] Fix: date must be quoted --- htdocs/fourn/class/fournisseur.commande.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index d7949f03037..3eef7d0116a 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -263,7 +263,7 @@ class CommandeFournisseur extends Commande function log($user, $statut, $datelog, $comment='') { $sql = "INSERT INTO ".MAIN_DB_PREFIX."commande_fournisseur_log (datelog, fk_commande, fk_statut, fk_user, comment)"; - $sql.= " VALUES (".$this->db->idate($datelog).",".$this->id.", ".$statut.", "; + $sql.= " VALUES ('".$this->db->idate($datelog)."',".$this->id.", ".$statut.", "; $sql.= $user->id.", "; $sql.= ($comment?"'".$this->db->escape($comment)."'":'null'); $sql.= ")";