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 <eldy@destailleur.fr>
This commit is contained in:
Vincent Maury 2025-06-28 17:34:12 +02:00 committed by GitHub
parent e6ff31abf1
commit b940f2eae3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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()