diff options
Diffstat (limited to 'src/Readability.php')
-rw-r--r-- | src/Readability.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Readability.php b/src/Readability.php index f31ed75..1c24633 100644 --- a/src/Readability.php +++ b/src/Readability.php @@ -1281,9 +1281,9 @@ class Readability /** @var DOMNode $table */ $tbody = $table->hasSingleTagInsideElement('tbody') ? $table->childNodes[0] : $table; if ($tbody->hasSingleTagInsideElement('tr')) { - $row = $tbody->firstChild; + $row = $tbody->getFirstElementChild(); if ($row->hasSingleTagInsideElement('td')) { - $cell = $row->firstChild; + $cell = $row->getFirstElementChild(); $cell = NodeUtility::setNodeTag($cell, (array_reduce(iterator_to_array($cell->childNodes), function ($carry, $node) { return $node->isPhrasingContent() && $carry; }, true)) ? 'p' : 'div'); |