8000 Use XML_ELEMENT_NODE in nodeType check · symfony/symfony@cffea91 · GitHub
[go: up one dir, main page]

Skip to content

Commit cffea91

Browse files
committed
Use XML_ELEMENT_NODE in nodeType check
1 parent 56624e6 commit cffea91

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/DomCrawler/Crawler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ public function parents()
455455
$nodes = array();
456456

457457
while ($node = $node->parentNode) {
458-
if (1 === $node->nodeType) {
458+
if (XML_ELEMENT_NODE === $node->nodeType) {
459459
$nodes[] = $node;
460460
}
461461
}

0 commit comments

Comments
 (0)
0