Commit a10cf96d by lmf

恢复代码

parent 95d52f58
...@@ -100,7 +100,7 @@ class GalleryManagement implements \Magento\Catalog\Api\ProductAttributeMediaGal ...@@ -100,7 +100,7 @@ class GalleryManagement implements \Magento\Catalog\Api\ProductAttributeMediaGal
$existingMediaGalleryEntries = $product->getMediaGalleryEntries(); $existingMediaGalleryEntries = $product->getMediaGalleryEntries();
if ($existingMediaGalleryEntries == null) { if ($existingMediaGalleryEntries == null) {
throw new NoSuchEntityException( throw new NoSuchEntityException(
__('No image with the provided ID was found. Verify the ID and try again 11111111111.') __('No image with the provided ID was found. Verify the ID and try again 4.')
); );
} }
$found = false; $found = false;
...@@ -116,7 +116,7 @@ class GalleryManagement implements \Magento\Catalog\Api\ProductAttributeMediaGal ...@@ -116,7 +116,7 @@ class GalleryManagement implements \Magento\Catalog\Api\ProductAttributeMediaGal
} }
if (!$found) { if (!$found) {
throw new NoSuchEntityException( throw new NoSuchEntityException(
__('No image with the provided ID was found. Verify the ID and try again 22222222222.') __('No image with the provided ID was found. Verify the ID and try again 3.')
); );
} }
$product->setMediaGalleryEntries($existingMediaGalleryEntries); $product->setMediaGalleryEntries($existingMediaGalleryEntries);
...@@ -138,7 +138,7 @@ class GalleryManagement implements \Magento\Catalog\Api\ProductAttributeMediaGal ...@@ -138,7 +138,7 @@ class GalleryManagement implements \Magento\Catalog\Api\ProductAttributeMediaGal
$existingMediaGalleryEntries = $product->getMediaGalleryEntries(); $existingMediaGalleryEntries = $product->getMediaGalleryEntries();
if ($existingMediaGalleryEntries == null) { if ($existingMediaGalleryEntries == null) {
throw new NoSuchEntityException( throw new NoSuchEntityException(
__('No image with the provided ID was found. Verify the ID and try again.') __('No image with the provided ID was found. Verify the ID and try again 1.')
); );
} }
$found = false; $found = false;
...@@ -151,7 +151,7 @@ class GalleryManagement implements \Magento\Catalog\Api\ProductAttributeMediaGal ...@@ -151,7 +151,7 @@ class GalleryManagement implements \Magento\Catalog\Api\ProductAttributeMediaGal
} }
if (!$found) { if (!$found) {
throw new NoSuchEntityException( throw new NoSuchEntityException(
__('No image with the provided ID was found. Verify the ID and try again.') __('No image with the provided ID was found. Verify the ID and try again 2.')
); );
} }
$product->setMediaGalleryEntries($existingMediaGalleryEntries); $product->setMediaGalleryEntries($existingMediaGalleryEntries);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment