mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-24 13:54:28 +01:00
When PRODUIT_MULTIPRICES is enabled and a product variant's parent has multiprices configured, the updateChildPrice() method iterates through all price levels up to PRODUIT_MULTIPRICES_LIMIT. For price levels that don't have prices defined, accessing $parent->multiprices[$i] and related arrays directly causes 'undefined array key' warnings on PHP 8.1+. Changes: - Add isset() check before comparing $parent->multiprices[$i] - Use isset() ternary for $parent->multiprices_min[$i] (default: 0) - Use !empty() for $parent->prices_by_qty_list[$i] check - Use isset() ternary for $parent->multiprices_ttc[$i] (default: 0) - Use isset() ternary for second $parent->multiprices[$i] (default: 0) Co-authored-by: f-hoedl <hoefla14@htl-kaindorf.ac.at> Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>