Permalink
Browse files

Fixing the scannable XML element cloning which did not reset the chil…

…dren counter.
  • Loading branch information...
1 parent 36627db commit 626c3af047c63650c80712c876ef3ec5a1efb10c @zyxist zyxist committed Nov 6, 2010
Showing with 2 additions and 4 deletions.
  1. +2 −4 lib/Opt/Xml/Scannable.php
@@ -70,10 +70,6 @@ public function appendChild(Opt_Xml_Node $child)
// empty array if needed.
$this->_testNode($child);
- if($child->_parent !== null)
- {
- var_dump(spl_object_hash($child->_parent));
- }
$child->unmount();
if($this->_last === null)
{
@@ -87,6 +83,7 @@ public function appendChild(Opt_Xml_Node $child)
$this->_last->_next = $child;
$this->_last = $child;
}
+
$this->_size++;
} // end appendChild();
@@ -654,6 +651,7 @@ public function bringToEnd($node)
$this->_first = null;
$this->_last = null;
$this->_parent = null;
+ $this->_size = 0;
$this->_cloneHandler();
}
else

0 comments on commit 626c3af

Please sign in to comment.