[DomCrawler] minor performance improvement
This commit is contained in:
parent
009b4d216e
commit
eead301224
@ -1081,8 +1081,9 @@ class Crawler implements \Countable, \IteratorAggregate
|
|||||||
{
|
{
|
||||||
$nodes = array();
|
$nodes = array();
|
||||||
|
|
||||||
|
$currentNode = $this->getNode(0);
|
||||||
do {
|
do {
|
||||||
if ($node !== $this->getNode(0) && 1 === $node->nodeType) {
|
if ($node !== $currentNode && XML_ELEMENT_NODE === $node->nodeType) {
|
||||||
$nodes[] = $node;
|
$nodes[] = $node;
|
||||||
}
|
}
|
||||||
} while ($node = $node->$siblingDir);
|
} while ($node = $node->$siblingDir);
|
||||||
|
Reference in New Issue
Block a user