Permalink
Browse files

Update parent refernence when cloning, otherwise, they'll all point t…

…o the wrong object
  • Loading branch information...
1 parent c18a725 commit e3bd4bd8e3c0be1a19a2401aa63df5b7519b5a77 @flack committed Jun 5, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 controller.php
View
@@ -1,6 +1,6 @@
<?php
/**
- * Abstract baseclass for the Object controller
+ * The type/object controller
*
* @copyright CONTENT CONTROL GbR, http://www.contentcontrol-berlin.de
* @author CONTENT CONTROL GbR, http://www.contentcontrol-berlin.de
@@ -171,6 +171,7 @@ public function __clone()
foreach ($this->_children as $name => $node)
{
$this->$name = clone $node;
+ $this->$name->set_parent($this);
}
}
}

0 comments on commit e3bd4bd

Please sign in to comment.