baumrock / RockMigrations

The Ultimate Automation and Deployment-Tool for ProcessWire
MIT License
34 stars 10 forks source link

fix: PHP Warning: Invalid argument supplied for foreach() in RockMigr… #31

Closed gebeer closed 1 year ago

gebeer commented 1 year ago

…ations.module.php:3510

Hi, When exporting field data with getConfig(), it sometimes contains 'template_ids' => '', This threw a Warning because the foreach cannot loop through an empty string. Also checking for $val avoids this.

gebeer commented 1 year ago

Didn't pay attention, so the PR wants to merge into main. You might want to merge this into dev instead. At least that was my intention :-)

BernhardBaumrock commented 1 year ago

I'll make that change manually, thank you very much for the fix :)