Skip to content

Commit 2e03028

Browse files
committed
MAGETWO-54718: [GitHub] Exception thrown where no Product Image file found #5184
1 parent 3459ef1 commit 2e03028

File tree

1 file changed

+2
-1
lines changed
  • app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery

1 file changed

+2
-1
lines changed

app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery/Content.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
use Magento\Backend\Block\Media\Uploader;
1717
use Magento\Framework\View\Element\AbstractBlock;
1818
use Magento\Framework\App\Filesystem\DirectoryList;
19+
use Magento\Framework\Exception\FileSystemException;
1920

2021
class Content extends \Magento\Backend\Block\Widget
2122
{
@@ -145,7 +146,7 @@ public function getImagesJson()
145146
try {
146147
$fileHandler = $mediaDir->stat($this->_mediaConfig->getMediaPath($image['file']));
147148
$image['size'] = $fileHandler['size'];
148-
} catch (\Magento\Framework\Exception\FileSystemException $e) {
149+
} catch (FileSystemException $e) {
149150
$staticDir = $this->_filesystem->getDirectoryRead(DirectoryList::STATIC_VIEW);
150151
$image['url'] = $this->getImageHelper()->getDefaultPlaceholderUrl('thumbnail');
151152
$fileHandler = $staticDir->stat(

0 commit comments

Comments
 (0)