Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Save.php #8642

Merged
merged 1 commit into from
Feb 25, 2017
Merged

Update Save.php #8642

merged 1 commit into from
Feb 25, 2017

Commits on Feb 21, 2017

  1. Update Save.php

    If quantity is changed using mass action for attribute changes, but no stock item exists for the product, saving the newly created stockItem in StockItemRepository->save($stockItem) returns without saving the stockItem, since $stockItem->getProductId() is null, due to it being added to the array with key '0' (see line 165). To fix this, the array key has been changed to "product_id", such that StockItemRepository successfully creates the stockItem.
    Also, in my opinion, StockItemRepository->save() should not just return without notice, especially as it already encapsulates the functionality in a try/catch block. Throwing an exception would actually tell the user that something went wrong.
    josefbehr authored Feb 21, 2017
    Configuration menu
    Copy the full SHA
    8a0f0c6 View commit details
    Browse the repository at this point in the history