Skip to content

Commit 2de0d7d

Browse files
authored
Merge pull request #345 from magento-gl/AC-3560
[Arrows] Delivery for RFC: Deprecate passing null
2 parents e98a9e4 + 7596129 commit 2de0d7d

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

app/code/Magento/PageBuilder/Model/Filter/Template.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ private function generateDecodedHtmlPlaceholderMappingInDocument(DOMDocument $do
221221
$htmlContentTypeNode->setAttribute('data-decoded', 'true');
222222

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

app/code/Magento/PageBuilderAnalytics/Model/ContentTypeUsageReportProvider.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ public function getReport($name) : \IteratorIterator
8080
{
8181
$query = $this->queryFactory->create($name);
8282

83+
$reportData = [];
8384
// Prepare our type count data
8485
$typeCounts = [];
8586
$contentTypes = $this->config->getContentTypes();
@@ -102,7 +103,7 @@ public function getReport($name) : \IteratorIterator
102103
foreach ($contentTypes as $type) {
103104
// Count the amount of content types within the content
104105
$rowContent = $row['content'] ?? '';
105-
if (strlen($rowContent) > 0) {
106+
if ($rowContent !== null && strlen($rowContent) > 0) {
106107
$typeCounts[$type['name']] += substr_count(
107108
$rowContent,
108109
'data-content-type="' . $type['name'] . '"'

0 commit comments

Comments
 (0)