From b940f2eae343742e8940c5cd06dd7938e50a4ee9 Mon Sep 17 00:00:00 2001 From: Vincent Maury Date: Sat, 28 Jun 2025 17:34:12 +0200 Subject: [PATCH 1/2] Fix bug in product->get_sousproduits_arbo (#34561) * Update product.class.php depending on php version used, when var $this->sousprods not correctly declared it'snot filled * Update product.class.php sousprods prop now initialized when declared --------- Co-authored-by: Laurent Destailleur --- htdocs/product/class/product.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 7f8de67a96a..b7647340ee9 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -496,7 +496,7 @@ class Product extends CommonObject * * @var array */ - public $sousprods; + public $sousprods = array(); /** * Path of subproducts. Build from ->sousprods with get_arbo_each_prod() From e18c5b9d68c5de56b26bf56001ed49779a2f8ce3 Mon Sep 17 00:00:00 2001 From: ldestailleur Date: Sat, 28 Jun 2025 17:40:01 +0200 Subject: [PATCH 2/2] Fix CI --- 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 0ef47565253..881823813f8 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -5118,7 +5118,7 @@ class Facture extends CommonInvoice while ($obj = $this->db->fetch_object($resql)) { // Create a loopError that is reset at each loop, this counter is added to the global counter at the end of loop $loopError = 0; - + // Load event $res = $tmpinvoice->fetch($obj->id); if ($res > 0) { @@ -5213,7 +5213,7 @@ class Facture extends CommonInvoice $errorsMsg[] = 'Failed to fetch record invoice with ID = '.$obj->id; $loopError++; } - + $error += $loopError; } } else {