Use XML_ELEMENT_NODE in nodeType check
This commit is contained in:
parent
56624e6a9d
commit
cffea91c8e
@ -455,7 +455,7 @@ class Crawler extends \SplObjectStorage
|
|||||||
$nodes = array();
|
$nodes = array();
|
||||||
|
|
||||||
while ($node = $node->parentNode) {
|
while ($node = $node->parentNode) {
|
||||||
if (1 === $node->nodeType) {
|
if (XML_ELEMENT_NODE === $node->nodeType) {
|
||||||
$nodes[] = $node;
|
$nodes[] = $node;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user