Skip to content

Commit

Permalink
MAGETWO-54718: [GitHub] Exception thrown where no Product Image file …
Browse files Browse the repository at this point in the history
…found #5184
  • Loading branch information
oserediuk committed Jul 8, 2016
1 parent 3459ef1 commit 2e03028
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
use Magento\Backend\Block\Media\Uploader;
use Magento\Framework\View\Element\AbstractBlock;
use Magento\Framework\App\Filesystem\DirectoryList;
use Magento\Framework\Exception\FileSystemException;

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

0 comments on commit 2e03028

Please sign in to comment.