We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cd3c5b3 commit 03e14f0Copy full SHA for 03e14f0
app/code/Magento/PageBuilderAnalytics/Model/ContentTypeUsageReportProvider.php
@@ -101,10 +101,13 @@ public function getReport($name) : \IteratorIterator
101
foreach ($batchQuery->fetchAll() as $row) {
102
foreach ($contentTypes as $type) {
103
// Count the amount of content types within the content
104
- $typeCounts[$type['name']] += substr_count(
105
- $row['content'] ?? '',
106
- 'data-content-type="' . $type['name'] . '"'
107
- );
+ $rowContent = $row['content'] ?? '';
+ if (strlen($rowContent) > 0) {
+ $typeCounts[$type['name']] += substr_count(
+ $rowContent,
108
+ 'data-content-type="' . $type['name'] . '"'
109
+ );
110
+ }
111
}
112
113
0 commit comments