Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…page-builder into develop
  • Loading branch information
mage-os-ci committed Aug 29, 2024
2 parents 1306370 + 2de0d7d commit 8cc6095
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/code/Magento/PageBuilder/Model/Filter/Template.php
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ private function generateDecodedHtmlPlaceholderMappingInDocument(DOMDocument $do
$htmlContentTypeNode->setAttribute('data-decoded', 'true');

// if nothing exists inside the node, continue
if (!strlen(trim($htmlContentTypeNode->nodeValue))) {
if (!strlen(trim($htmlContentTypeNode->nodeValue ?? ''))) {
continue;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ public function getReport($name) : \IteratorIterator
{
$query = $this->queryFactory->create($name);

$reportData = [];
// Prepare our type count data
$typeCounts = [];
$contentTypes = $this->config->getContentTypes();
Expand All @@ -102,7 +103,7 @@ public function getReport($name) : \IteratorIterator
foreach ($contentTypes as $type) {
// Count the amount of content types within the content
$rowContent = $row['content'] ?? '';
if (strlen($rowContent) > 0) {
if ($rowContent !== null && strlen($rowContent) > 0) {
$typeCounts[$type['name']] += substr_count(
$rowContent,
'data-content-type="' . $type['name'] . '"'
Expand Down

0 comments on commit 8cc6095

Please sign in to comment.