From 1f1f96b7e143973e7da69fc01ebd6721f62e291c Mon Sep 17 00:00:00 2001 From: xue <> Date: Sat, 10 Dec 2005 02:02:10 +0000 Subject: --- framework/Web/UI/WebControls/TContentPlaceHolder.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'framework/Web/UI/WebControls/TContentPlaceHolder.php') 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); } } -- cgit v1.2.3