Skip to content

Commit 8bbddb0

Browse files
author
Oleksii Korshenko
authored
Merge pull request #1404 from magento-engcom/develop-prs
Public Pull Requests #10483
2 parents 51b58c5 + afdb6df commit 8bbddb0

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class Configurable extends Renderer implements IdentityInterface
2424
/**
2525
* Get item configurable child product
2626
*
27-
* @return \Magento\Catalog\Model\Product
27+
* @return \Magento\Catalog\Model\Product|null
2828
*/
2929
public function getChildProduct()
3030
{
@@ -66,8 +66,9 @@ 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 ||
70-
!($this->getChildProduct()->getThumbnail() && $this->getChildProduct()->getThumbnail() != 'no_selection')
69+
) == ThumbnailSource::OPTION_USE_PARENT_IMAGE
70+
|| !($this->getChildProduct()
71+
&& $this->getChildProduct()->getThumbnail() && $this->getChildProduct()->getThumbnail() != 'no_selection')
7172
) {
7273
$product = $this->getProduct();
7374
} else {

0 commit comments

Comments
 (0)