summaryrefslogtreecommitdiff
path: root/src/Nodes/NodeTrait.php
diff options
context:
space:
mode:
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;
}