summaryrefslogtreecommitdiff
path: root/framework/Web/UI/TTemplateControl.php
diff options
context:
space:
mode:
authorxue <>2006-03-01 01:22:28 +0000
committerxue <>2006-03-01 01:22:28 +0000
commit83cce043e7364367d4365752ba8c1ed807dd5557 (patch)
tree46b737ce676f5133a853c0b67a4c792765466291 /framework/Web/UI/TTemplateControl.php
parent3b91e1039d8bd9dcc3db14734eca4e88fdbcb2f0 (diff)
Added some more sanity checks of template usage.
Diffstat (limited to 'framework/Web/UI/TTemplateControl.php')
-rw-r--r--framework/Web/UI/TTemplateControl.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/framework/Web/UI/TTemplateControl.php b/framework/Web/UI/TTemplateControl.php
index 18766102..c902295c 100644
--- a/framework/Web/UI/TTemplateControl.php
+++ b/framework/Web/UI/TTemplateControl.php
@@ -128,7 +128,12 @@ class TTemplateControl extends TControl implements INamingContainer
if($tpl=$this->getTemplate(true))
{
foreach($tpl->getDirective() as $name=>$value)
- $this->setSubProperty($name,$value);
+ {
+ if(is_string($value))
+ $this->setSubProperty($name,$value);
+ else
+ throw new TConfigurationException('templatecontrol_directive_invalid',get_class($this),$name);
+ }
$tpl->instantiateIn($this);
}
}