Skip to content

Commit 6e3ebfb

Browse files
committed
10797: catalogProductTierPriceManagementV1 DELETE and POST operation wipes out media gallery selections when used on store code "all".
1 parent 5aef35b commit 6e3ebfb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/code/Magento/Catalog/Model/ProductRepository.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ protected function processMediaGallery(ProductInterface $product, array $mediaGa
507507
foreach ($existingMediaGallery as $key => &$existingEntry) {
508508
if (isset($entriesById[$existingEntry['value_id']])) {
509509
$updatedEntry = $entriesById[$existingEntry['value_id']];
510-
if (isset($updatedEntry['file']) && $updatedEntry['file'] === null) {
510+
if (array_key_exists('file', $updatedEntry) && $updatedEntry['file'] === null) {
511511
unset($updatedEntry['file']);
512512
}
513513
$existingMediaGallery[$key] = array_merge($existingEntry, $updatedEntry);

0 commit comments

Comments
 (0)