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.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 3213862-2-warning_triggered_on_settings_page_if_fees_have_not_been_set.patch | 3.44 KB | creativepragmatic |
Issue fork commerce_product_type_fees-3213862
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
creativepragmatic commentedComment #5
rajeevgoleThanks for the catch and for providing the patch. Merged.