From bcf6d6a7a2e0a42ff03672ea524caefe5aa7f93a Mon Sep 17 00:00:00 2001 From: lvessiller-opendsi Date: Thu, 25 Sep 2025 11:47:51 +0200 Subject: [PATCH] FIX api orders : forward database error on failure (backpot commit d9e81cb) (#35478) --- htdocs/commande/class/commande.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }