Skip to content

Commit ae2b145

Browse files
committed
Check for invalid childNodes
1 parent 60c8678 commit ae2b145

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/Caxy/HtmlDiff/Table/TableDiff.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -639,6 +639,10 @@ protected function parseTable(Table $table, \DOMNode $node = null)
639639
$node = $table->getDomNode();
640640
}
641641

642+
if (!$node->childNodes) {
643+
return;
644+
}
645+
642646
foreach ($node->childNodes as $child) {
643647
if ($child->nodeName === 'tr') {
644648
$row = new TableRow($child);

0 commit comments

Comments
 (0)