Skip to content

Commit 4cf56a4

Browse files
AC-3560::Fix potential problems with "RFC: Deprecate passing null" for Magento page-builder
1 parent 4d5db10 commit 4cf56a4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ public function getReport($name) : \IteratorIterator
102102
foreach ($contentTypes as $type) {
103103
// Count the amount of content types within the content
104104
$rowContent = $row['content'] ?? '';
105-
if (strlen($rowContent) > 0) {
105+
if ($rowContent !== null && strlen($rowContent) > 0) {
106106
$typeCounts[$type['name']] += substr_count(
107107
$rowContent,
108108
'data-content-type="' . $type['name'] . '"'

0 commit comments

Comments
 (0)