Skip to content

Commit 888fa8f

Browse files
committed
MC-15322: Fatal error when selecting Product CMS page design
Type-check $product
1 parent 9f43113 commit 888fa8f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/code/Magento/PageBuilder/view/frontend/templates/catalog/product/view/attribute_list.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
$helper = $this->helper(Magento\Catalog\Helper\Output::class);
1515
$product = $block->getProduct();
1616
?>
17-
<?php if ($additional = $block->getAdditionalData()) : ?>
17+
<?php if ($product && ($additional = $block->getAdditionalData())) : ?>
1818
<div class="pagebuilder-attributes-wrapper">
1919
<?php foreach ($additional as $data) : ?>
2020
<div class="product-full-width-section">

app/code/Magento/PageBuilder/view/frontend/templates/catalog/product/view/section_wrapper.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
* @var \Magento\Framework\View\Element\Template $block
1111
*/
12-
$childHtml = $block->getChildHtml();
12+
$childHtml = $block->getProduct() ? $block->getChildHtml() : '';
1313
?>
1414
<?php if (trim($childHtml) !== "") : ?>
1515
<div class="product-full-width-section">

0 commit comments

Comments
 (0)