Skip to content

Commit

Permalink
Product not exist fix when attempt to get an image
Browse files Browse the repository at this point in the history
  • Loading branch information
ilnytskyi committed Feb 14, 2020
1 parent 03c84ec commit 405dfec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/code/Magento/Catalog/Helper/Image.php
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ protected function initBaseFile()
if ($this->getImageFile()) {
$model->setBaseFile($this->getImageFile());
} else {
$model->setBaseFile($this->getProduct()->getData($model->getDestinationSubdir()));
$model->setBaseFile($this->getProduct() ? $this->getProduct()->getData($model->getDestinationSubdir()) : '');
}
}
return $this;
Expand Down

0 comments on commit 405dfec

Please sign in to comment.