function _pop_tag($close_tag) { $message = ''; if (count($this->_tag_stack) > 0) { list($_open_tag, $_line_no) = array_pop($this->_tag_stack); if ($close_tag == $_open_tag) { return $_open_tag; } if ($close_tag == 'formset' && $_open_tag == 'formsetelse') { $this->_pop_tag($close_tag); return $_open_tag; } if ($_open_tag == 'formsetelse') { $_open_tag = 'formset'; $message = " expected {/{$_open_tag}} (opened line {$_line_no})."; $this->_syntax_error("mismatched tag {/{$close_tag}}.{$message}", E_USER_ERROR, __FILE__, __LINE__); return; } } return parent::_pop_tag($close_tag); }