pull/97/merge
Oliver Feige 1 year ago committed by GitHub
commit 60f4fe7f60
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 1
      src/Readability.php

@ -1480,6 +1480,7 @@ class Readability implements LoggerAwareInterface
$childNodes = iterator_to_array($node->childNodes); $childNodes = iterator_to_array($node->childNodes);
$children = array_filter($childNodes, fn ($childNode) => $childNode instanceof \DOMElement); $children = array_filter($childNodes, fn ($childNode) => $childNode instanceof \DOMElement);
$children = array_values($children);
// There should be exactly 1 element child with given tag // There should be exactly 1 element child with given tag
if (1 !== \count($children) || $children[0]->nodeName !== $tag) { if (1 !== \count($children) || $children[0]->nodeName !== $tag) {
return false; return false;

Loading…
Cancel
Save