Skip to content

Commit 891b008

Browse files
committed
Remove pointless stdClass
`DOMNode::$childNodes` always contained `DOMNodeList`.
1 parent cb6b6ac commit 891b008

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

src/Readability.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1231,11 +1231,6 @@ protected function grabArticle(?\DOMElement $page = null)
12311231
$parentOfTopCandidate = $topCandidate->parentNode;
12321232
$siblingNodes = $parentOfTopCandidate->childNodes;
12331233

1234-
if (0 === $siblingNodes->length) {
1235-
$siblingNodes = new \stdClass();
1236-
$siblingNodes->length = 0;
1237-
}
1238-
12391234
for ($s = 0, $sl = $siblingNodes->length; $s < $sl; ++$s) {
12401235
$siblingNode = $siblingNodes->item($s);
12411236
$siblingNodeName = $siblingNode->nodeName;

0 commit comments

Comments
 (0)