From 27236fe8532f13ab16d4838844ec2a9354f20fe6 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Thu, 6 Oct 2022 10:36:11 +0200 Subject: [PATCH 01/19] fix: display correct id of thirdparty --- htdocs/compta/facture/class/facture.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index ec8e4a93b80..c81fdcd7635 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -5143,11 +5143,11 @@ class Facture extends CommonInvoice if (!empty($recipient->email)) { $to = $recipient->email; } else { - $errormesg = "Failed to send remind to thirdparty id=".$tmpinvoice->fk_soc.". No email defined for user."; + $errormesg = "Failed to send remind to thirdparty id=".$tmpinvoice->thirdparty->id.". No email defined for user."; $error++; } } else { - $errormesg = "Failed to load recipient with thirdparty id=".$tmpinvoice->fk_soc; + $errormesg = "Failed to load recipient with thirdparty id=".$tmpinvoice->thirdparty->id; $error++; } From 4bb4d2dc64a2b4da27e19bea370374742405ca18 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Fri, 7 Oct 2022 08:54:13 +0200 Subject: [PATCH 02/19] FIX remove db object for avoid error with postgresql --- htdocs/variants/ajax/get_attribute_values.php | 5 +++++ htdocs/variants/combinations.php | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/htdocs/variants/ajax/get_attribute_values.php b/htdocs/variants/ajax/get_attribute_values.php index 1d4eab49773..7a18f54657b 100644 --- a/htdocs/variants/ajax/get_attribute_values.php +++ b/htdocs/variants/ajax/get_attribute_values.php @@ -77,6 +77,11 @@ $prodattrval = new ProductAttributeValue($db); $res = $prodattrval->fetchAllByProductAttribute($id); +// Remove db for avoid error with postgresql +foreach ($res as $key => $val) { + unset($res[$key]->db); +} + if ($res == -1) { print json_encode(array( 'error' => 'Internal error' diff --git a/htdocs/variants/combinations.php b/htdocs/variants/combinations.php index f8fb962e1ef..adf396bf88d 100644 --- a/htdocs/variants/combinations.php +++ b/htdocs/variants/combinations.php @@ -477,8 +477,9 @@ if (!empty($id) || !empty($ref)) { foreach ($prodattr_all as $each) { $prodattr_alljson[$each->id] = $each; + // Remove db for avoid error with postgresql + unset($prodattr_alljson[$each->id]->db); } - ?>