diff --git a/include/sieve/class_sieveElement_Require.inc b/include/sieve/class_sieveElement_Require.inc
index dffbf375b0762c0b221154072083f3da47ff8345..3b91b8205f8d0b065fb55953dd3be32e1f4c85af 100644 (file)
function sieve_require($data,$object_id)
{
- $this->object_id = $object_id;
- foreach($data['ELEMENTS'] as $node ){
- if(in_array($node['class'],array("quoted-string","text"))){
- $this->data[] = preg_replace("/\"/","",$node['text']);
+ if($data != NULL){
+
+ $this->object_id = $object_id;
+ foreach($data['ELEMENTS'] as $node ){
+ if(in_array($node['class'],array("quoted-string","text"))){
+ $this->data[] = preg_replace("/\"/","",$node['text']);
+ }
}
}
}
$smarty->assign("LastError",$tmp);
$smarty->assign("LastErrorCnt",count($tmp));
$smarty->assign("ID", $this->object_id);
- $object_container = $smarty->fetch(get_template_path("templates/object_container_clear.tpl",TRUE,dirname(__FILE__)));
+ $object_container = $smarty->fetch(get_template_path("templates/object_container.tpl",TRUE,dirname(__FILE__)));
$object= $smarty->fetch(get_template_path("templates/element_require.tpl",TRUE,dirname(__FILE__)));
$str = preg_replace("/%%OBJECT_CONTENT%%/",$object,$object_container);
return($str);