diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 5c38cbdf51d..eb0b6378d79 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -1156,7 +1156,7 @@ class Commande extends CommonOrder } } } else { - dol_print_error($this->db); + $this->error = $this->db->lasterror(); $this->db->rollback(); return -1; }