Problem/Motivation
On the 'Fees Settings' form if there have not been any fees added to a product type, the following warning appears:
Warning: Invalid argument supplied for foreach() in Drupal\commerce_product_type_fees\Form\FeesSettingsForm->buildForm() (line 122 of modules\contrib\commerce_product_type_fees\src\Form\FeesSettingsForm.php).
Steps to reproduce
Install the module and navigate to 'Commerce' => 'Configuration' => 'Fees' => 'Configure Fees'.
Proposed resolution
Prevent the 'foreach' loop from being executed if fees have not been set for a product type.
Remaining tasks
Test and apply submitted patch.
User interface changes
None.
API changes
None.
Data model changes
None.
Comments
Comment #2
creativepragmatic commentedComment #5
rajeevgoleThanks for the catch and for providing the patch. Merged.