Skip to content

Commit 6ae60c3

Browse files
authored
Update Configurable.php
Check to make sure that $this->getChildProduct() isn't null here before trying to call any class methods on it.
1 parent 51b58c5 commit 6ae60c3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/code/Magento/ConfigurableProduct/Block/Cart/Item/Renderer/Configurable.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public function getProductForThumbnail()
6666
if ($this->_scopeConfig->getValue(
6767
self::CONFIG_THUMBNAIL_SOURCE,
6868
\Magento\Store\Model\ScopeInterface::SCOPE_STORE
69-
) == ThumbnailSource::OPTION_USE_PARENT_IMAGE ||
69+
) == ThumbnailSource::OPTION_USE_PARENT_IMAGE || (empty($this->getChildProduct()) ||
7070
!($this->getChildProduct()->getThumbnail() && $this->getChildProduct()->getThumbnail() != 'no_selection')
7171
) {
7272
$product = $this->getProduct();

0 commit comments

Comments
 (0)