Skip to content
This repository was archived by the owner on Jun 20, 2019. It is now read-only.

Commit e9c28b5

Browse files
author
Matt Karl
committed
Merge pull request #6 from JustBlackBird/fix_add_child_at
Fix NodeContainer::addChildAt method
2 parents c5d4f89 + 72c2523 commit e9c28b5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/NodeContainer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public function addChildAt($childNode, $index)
8383
{
8484
array_unshift($this->_children, $childNode);
8585
}
86-
else if ($index > $len)
86+
else if ($index > (count($this->_children) - 1))
8787
{
8888
$this->addChild($childNode);
8989
}

0 commit comments

Comments
 (0)