diff options
author | Andres Rey <[email protected]> | 2019-07-15 23:03:38 +0100 |
---|---|---|
committer | Andres Rey <[email protected]> | 2019-07-15 23:03:38 +0100 |
commit | 209919fbbb31c97b09c4d2b04e7b3b2204b3d3a6 (patch) | |
tree | da33bb94054ea3ede86dfd0b970e840932a09d49 /src/Readability.php | |
parent | db65ea7804d655ffc7a3cc478152cce70777ed4c (diff) |
Fix wrong access to first element child
Diffstat (limited to 'src/Readability.php')
-rw-r--r-- | src/Readability.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Readability.php b/src/Readability.php index 921101f..6bcbf78 100644 --- a/src/Readability.php +++ b/src/Readability.php @@ -1280,7 +1280,7 @@ class Readability // Remove single-cell tables foreach ($article->shiftingAwareGetElementsByTagName('table') as $table) { /** @var DOMNode $table */ - $tbody = $table->hasSingleTagInsideElement('tbody') ? $table->childNodes[0] : $table; + $tbody = $table->hasSingleTagInsideElement('tbody') ? $table->getFirstElementChild() : $table; if ($tbody->hasSingleTagInsideElement('tr')) { $row = $tbody->getFirstElementChild(); if ($row->hasSingleTagInsideElement('td')) { |