After Data migration from Magento to 2.2 admin side products edit getting the error.

Warning: Invalid argument supplied for foreach() in /var/www/html/new/vendor/magento/module-catalog-inventory/Helper/Minsaleqty.php on line 203

enter image description here

1 Answer 1


I know that in my case it's related to a module that was installed before the migration that doesn't work after the fact.

As a workaround, you can edit the file mentioned above,. and insert the following before the foreach() on line 203.

if( !is_array( $value ) ){ return false; }

This allows me to edit products once again. In my case it was to do with an affiliate plugin that was set to use special pricing.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.