If you have a donation form with only custom amount turned on and no donation levels, you get an Invalid argument supplied for foreach()
Expected Behavior
Only custom donation level input shows
Current Behavior
Custom input shows, but also PHP errors show if errors are allowed to be shown.
Warning: Invalid argument supplied for foreach() in /srv/users/serverpilot/apps/fixingtheboro/public/wp-content/plugins/give/includes/forms/template.php on line 146
Warning: Invalid argument supplied for foreach() in /srv/users/serverpilot/apps/fixingtheboro/public/wp-content/plugins/give/includes/price-functions.php on line 96
Warning: Invalid argument supplied for foreach() in /srv/users/serverpilot/apps/fixingtheboro/public/wp-content/plugins/give/includes/forms/template.php on line 501
Possible Solution
Check that the array isn't null before passing into the foreach
Issue Overview
If you have a donation form with only custom amount turned on and no donation levels, you get an Invalid argument supplied for foreach()
Expected Behavior
Only custom donation level input shows
Current Behavior
Custom input shows, but also PHP errors show if errors are allowed to be shown.
Possible Solution
Check that the array isn't null before passing into the foreach
Steps to Reproduce (for bugs)
https://fixingtheboro.com/donations/adoption/
Related Issues and/or PRs
Todos
WordPress Environment