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
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
Original file line number Diff line number Diff 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 ' ] . '" '
You can’t perform that action at this time.
0 commit comments