summaryrefslogtreecommitdiff
path: root/src/Nodes/NodeTrait.php
diff options
context:
space:
mode:
authorAndres Rey <[email protected]>2019-06-17 23:09:25 +0100
committerAndres Rey <[email protected]>2019-06-17 23:09:25 +0100
commita1243b7fa248f5abf197c4ff8c406d75dfdbdc6e (patch)
tree3b63985cfda4fc96c00ea8a7881815fe71df205b /src/Nodes/NodeTrait.php
parent544d1fd99185064af82d114d24cad73e63686810 (diff)
Make DOMNodeList more DOMNodeList...y
Diffstat (limited to 'src/Nodes/NodeTrait.php')
-rw-r--r--src/Nodes/NodeTrait.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Nodes/NodeTrait.php b/src/Nodes/NodeTrait.php
index 2b58167..dfff138 100644
--- a/src/Nodes/NodeTrait.php
+++ b/src/Nodes/NodeTrait.php
@@ -422,7 +422,7 @@ trait NodeTrait
public function hasSingleTagInsideElement($tag)
{
// There should be exactly 1 element child with given tag
- if (count($children = NodeUtility::filterTextNodes($this->childNodes)) !== 1 || $children[0]->nodeName !== $tag) {
+ if (count($children = NodeUtility::filterTextNodes($this->childNodes)) !== 1 || $children->item(0)->nodeName !== $tag) {
return false;
}