File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
app/code/Magento/Catalog/Model/Product/Gallery Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -206,7 +206,7 @@ public function execute($product, $arguments = [])
206
206
}
207
207
208
208
/**
209
- * Returns media gallery atribute instance
209
+ * Returns media gallery attribute instance
210
210
*
211
211
* @return \Magento\Catalog\Api\Data\ProductAttributeInterface
212
212
* @since 101.0.0
@@ -420,6 +420,7 @@ protected function copyImage($file)
420
420
$ destinationFile = $ this ->getUniqueFileName ($ file );
421
421
422
422
if (!$ this ->mediaDirectory ->isFile ($ this ->mediaConfig ->getMediaPath ($ file ))) {
423
+ // phpcs:ignore Magento2.Exceptions.DirectThrow
423
424
throw new \Exception ();
424
425
}
425
426
@@ -437,6 +438,7 @@ protected function copyImage($file)
437
438
}
438
439
439
440
return str_replace ('\\' , '/ ' , $ destinationFile );
441
+ // phpcs:ignore Magento2.Exceptions.ThrowCatch
440
442
} catch (\Exception $ e ) {
441
443
$ file = $ this ->mediaConfig ->getMediaPath ($ file );
442
444
throw new \Magento \Framework \Exception \LocalizedException (
You can’t perform that action at this time.
0 commit comments