Skip to content

Commit

Permalink
10797: catalogProductTierPriceManagementV1 DELETE and POST operation …
Browse files Browse the repository at this point in the history
…wipes out media gallery selections when used on store code "all".
  • Loading branch information
nmalevanec committed Dec 11, 2017
1 parent 5aef35b commit 6e3ebfb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/code/Magento/Catalog/Model/ProductRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ protected function processMediaGallery(ProductInterface $product, array $mediaGa
foreach ($existingMediaGallery as $key => &$existingEntry) {
if (isset($entriesById[$existingEntry['value_id']])) {
$updatedEntry = $entriesById[$existingEntry['value_id']];
if (isset($updatedEntry['file']) && $updatedEntry['file'] === null) {
if (array_key_exists('file', $updatedEntry) && $updatedEntry['file'] === null) {
unset($updatedEntry['file']);
}
$existingMediaGallery[$key] = array_merge($existingEntry, $updatedEntry);
Expand Down

0 comments on commit 6e3ebfb

Please sign in to comment.