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.

Command icon 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:

  • 8.x-1.x Comparecompare

Comments

creativepragmatic created an issue. See original summary.

creativepragmatic’s picture

Status: Active » Needs review
StatusFileSize
new3.44 KB

rajeevgole made their first commit to this issue’s fork.

rajeevgole’s picture

Status: Needs review » Fixed

Thanks for the catch and for providing the patch. Merged.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.