summaryrefslogtreecommitdiff
path: root/framework/Web/UI/WebControls/TContentPlaceHolder.php
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Web/UI/WebControls/TContentPlaceHolder.php')
-rw-r--r--framework/Web/UI/WebControls/TContentPlaceHolder.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/framework/Web/UI/WebControls/TContentPlaceHolder.php b/framework/Web/UI/WebControls/TContentPlaceHolder.php
index 32106e82..a13e85bc 100644
--- a/framework/Web/UI/WebControls/TContentPlaceHolder.php
+++ b/framework/Web/UI/WebControls/TContentPlaceHolder.php
@@ -39,8 +39,11 @@ class TContentPlaceHolder extends TControl
*/
public function createdOnTemplate($parent)
{
+ if(($id=$this->getID())==='')
+ throw new TConfigurationException('contentplaceholder_id_required');
$loc=$parent->getHasControls()?$parent->getControls()->getCount():0;
- $this->getTemplateControl()->registerContentPlaceHolder($this->getID(),$parent,$loc);
+ $this->getTemplateControl()->registerContentPlaceHolder($id,$parent,$loc);
+ $parent->unregisterObject($id);
}
}