File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
PageBuilderAnalytics/Model Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -221,7 +221,7 @@ private function generateDecodedHtmlPlaceholderMappingInDocument(DOMDocument $do
221
221
$ htmlContentTypeNode ->setAttribute ('data-decoded ' , 'true ' );
222
222
223
223
// if nothing exists inside the node, continue
224
- if (!strlen (trim ($ htmlContentTypeNode ->nodeValue ))) {
224
+ if (!strlen (trim ($ htmlContentTypeNode ->nodeValue ?? '' ))) {
225
225
continue ;
226
226
}
227
227
Original file line number Diff line number Diff line change @@ -80,6 +80,7 @@ public function getReport($name) : \IteratorIterator
80
80
{
81
81
$ query = $ this ->queryFactory ->create ($ name );
82
82
83
+ $ reportData = [];
83
84
// Prepare our type count data
84
85
$ typeCounts = [];
85
86
$ contentTypes = $ this ->config ->getContentTypes ();
@@ -102,7 +103,7 @@ public function getReport($name) : \IteratorIterator
102
103
foreach ($ contentTypes as $ type ) {
103
104
// Count the amount of content types within the content
104
105
$ rowContent = $ row ['content ' ] ?? '' ;
105
- if (strlen ($ rowContent ) > 0 ) {
106
+ if ($ rowContent !== null && strlen ($ rowContent ) > 0 ) {
106
107
$ typeCounts [$ type ['name ' ]] += substr_count (
107
108
$ rowContent ,
108
109
'data-content-type=" ' . $ type ['name ' ] . '" '
You can’t perform that action at this time.
0 commit comments