Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 37e795b

Browse files
committedMar 17, 2024
Remove pointless stdClass
DOMNode::$childNodes always contained DOMNodeList.
1 parent 002cfef commit 37e795b

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)
Please sign in to comment.