From 9d1915f9c289d9734347ab6dca50744666315ba7 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Wed, 6 Oct 2021 09:56:10 +0200 Subject: [PATCH 1/3] fix php warning --- htdocs/product/class/api_products.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/class/api_products.class.php b/htdocs/product/class/api_products.class.php index 2e0d21b0456..7b19739d10e 100644 --- a/htdocs/product/class/api_products.class.php +++ b/htdocs/product/class/api_products.class.php @@ -462,7 +462,7 @@ class Products extends DolibarrApi $childsArbo = $this->product->getChildsArbo($id, 1); - $keys = ['rowid', 'qty', 'fk_product_type', 'label', 'incdec']; + $keys = ['rowid','qty', 'fk_product_type', 'label', 'incdec','ref']; $childs = []; foreach ($childsArbo as $values) { $childs[] = array_combine($keys, $values); From 5d9c87a9ea87e522d1010f63fc4a9f6ed4c4694c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 6 Oct 2021 13:42:13 +0200 Subject: [PATCH 2/3] Update api_products.class.php --- htdocs/product/class/api_products.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/product/class/api_products.class.php b/htdocs/product/class/api_products.class.php index 7b19739d10e..a964b63799b 100644 --- a/htdocs/product/class/api_products.class.php +++ b/htdocs/product/class/api_products.class.php @@ -462,8 +462,8 @@ class Products extends DolibarrApi $childsArbo = $this->product->getChildsArbo($id, 1); - $keys = ['rowid','qty', 'fk_product_type', 'label', 'incdec','ref']; - $childs = []; + $keys = array('rowid','qty', 'fk_product_type', 'label', 'incdec','ref'); + $childs = array(); foreach ($childsArbo as $values) { $childs[] = array_combine($keys, $values); } From 7b1b7c0ad65731a1b1c4fa94e3d4f896d26924f2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 6 Oct 2021 13:42:49 +0200 Subject: [PATCH 3/3] Update api_products.class.php --- htdocs/product/class/api_products.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/class/api_products.class.php b/htdocs/product/class/api_products.class.php index a964b63799b..8f8f280b64b 100644 --- a/htdocs/product/class/api_products.class.php +++ b/htdocs/product/class/api_products.class.php @@ -462,7 +462,7 @@ class Products extends DolibarrApi $childsArbo = $this->product->getChildsArbo($id, 1); - $keys = array('rowid','qty', 'fk_product_type', 'label', 'incdec','ref'); + $keys = array('rowid', 'qty', 'fk_product_type', 'label', 'incdec', 'ref'); $childs = array(); foreach ($childsArbo as $values) { $childs[] = array_combine($keys, $values);