diff options
Diffstat (limited to 'framework/Web/UI')
-rw-r--r-- | framework/Web/UI/TTemplateControl.php | 7 | ||||
-rw-r--r-- | framework/Web/UI/TTemplateManager.php | 7 |
2 files changed, 13 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);
}
}
diff --git a/framework/Web/UI/TTemplateManager.php b/framework/Web/UI/TTemplateManager.php index 843331e9..0d2471f3 100644 --- a/framework/Web/UI/TTemplateManager.php +++ b/framework/Web/UI/TTemplateManager.php @@ -714,6 +714,13 @@ class TTemplate extends TApplicationComponent implements ITemplate else
throw new TConfigurationException('template_property_unknown',$type,$name);
}
+ else if(!is_string($att))
+ {
+ if(strcasecmp($name,'id')===0)
+ throw new TConfigurationException('template_controlid_invalid',$type);
+ else if(strcasecmp($name,'skinid')===0)
+ throw new TConfigurationException('template_controlskinid_invalid',$type);
+ }
}
}
}
|