$this->Application->handleError(E_USER_ERROR,'Unclosed tag opened by '.$this->TagInfo($this->Stack[$this->Level]->Tag),$this->Stack[$this->Level]->Tag['file'],$this->Stack[$this->Level]->Tag['line']);
returnfalse;
}
// appending text data after last tag (after its closing pos),
// if no tag was found at all ($tag_data is not set) - append the whole $data
if(class_exists('_Tag_'.$tag['name'])){// block tags should have special handling class
if($tag['opening']=='<'){
$class='_Tag_'.$tag['name'];
$instance=new$class($tag);
$instance->Parser=&$this;
/* @var $instance _BlockTag */
$this->Stack[++$this->Level]=&$instance;
$this->Buffers[$this->Level]='';
$this->Cachable[$this->Level]=true;
$open_code=$instance->Open($tag);
if($open_code===false){
returnfalse;
}
$o.=$open_code;
}
if($tag['is_closing']){// not ELSE here, because tag may be <empty/> and still has a handler-class
if($this->Level==0){
$dump=array();
foreach($this->Stackas$instance){
$dump[]=$instance->Tag;
}
print_pre($dump);
$this->Application->handleError(E_USER_ERROR,'Closing tag without an opening: '.$this->TagInfo($tag).' <b> - probably opening tag was removed or nested tags error</b>',$tag['file'],$tag['line']);
'Closing tag '.$this->TagInfo($tag).' does not match
opening tag at current nesting level ('.$this->TagInfo($opening_tag).'
opened at line '.$opening_tag['line'].')',$tag['file'],$tag['line']);
returnfalse;
}
$o.=$this->Stack[$this->Level]->Close($tag);// DO NOT use $this->Level-- here because it's used inside Close
$this->Level--;
}
}
else{// regular tags - just compile
if(!$tag['is_closing']){
$this->Application->handleError(E_USER_ERROR,'Tag without a handler: '.$this->TagInfo($tag).' <b> - probably missing <empty <span style="color: red">/</span>> tag closing</b>',$tag['file'],$tag['line']);
$this->Application->handleError(E_USER_ERROR,'Unknown tag: '.$this->TagInfo($tag).' <b> - incorrect tag name or prefix </b>',$tag['file'],$tag['line']);
$this->Application->Debugger->appendHTML('Canging PageCacheKey from "<strong>'.$page->GetOriginalField('PageCacheKey').'</strong>" to "<strong>'.$page_cache_key.'</strong>".');
$this->Application->handleError(E_USER_ERROR,'<b>Rendering of undefined element '.$params['name'].'</b>',$trace_results[0]['file'],$trace_results[0]['line']);