Skip to content

Commit 8b1deba

Browse files
Chhandak.Baruadevarul
authored andcommitted
ACP2E-1479: Product with any custom option causes an error when deleting product images
1 parent b40dcad commit 8b1deba

File tree

1 file changed

+1
-1
lines changed
  • app/code/Magento/Catalog/Controller/Adminhtml/Product

1 file changed

+1
-1
lines changed

app/code/Magento/Catalog/Controller/Adminhtml/Product/Save.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ private function handleImageRemoveError($postData, $productId)
232232
$expectedImagesAmount = count($postData['product']['media_gallery']['images']) - $removedImagesAmount;
233233
$product = $this->productRepository->getById($productId);
234234
$images = $product->getMediaGallery('images');
235-
if (is_array($images) && $expectedImagesAmount >= count(array_map('count', $images))) {
235+
if (is_array($images) && $expectedImagesAmount >= count($images)) {
236236
$this->messageManager->addNoticeMessage(
237237
__('The image cannot be removed as it has been assigned to the other image role')
238238
);

0 commit comments

Comments
 (0)