We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b40dcad commit 8b1debaCopy full SHA for 8b1deba
app/code/Magento/Catalog/Controller/Adminhtml/Product/Save.php
@@ -232,7 +232,7 @@ private function handleImageRemoveError($postData, $productId)
232
$expectedImagesAmount = count($postData['product']['media_gallery']['images']) - $removedImagesAmount;
233
$product = $this->productRepository->getById($productId);
234
$images = $product->getMediaGallery('images');
235
- if (is_array($images) && $expectedImagesAmount >= count(array_map('count', $images))) {
+ if (is_array($images) && $expectedImagesAmount >= count($images)) {
236
$this->messageManager->addNoticeMessage(
237
__('The image cannot be removed as it has been assigned to the other image role')
238
);
0 commit comments