original_string: public function outputError($elTpl, $error)
      {
          if ($error && !$this->options['group_errors']) {
              $elTpl = str_replace(array('<qf:error>', '</qf:error>', '{error}'),
                                    array('', '', $error), $elTpl);
          } else {
              if ($error && $this->options['group_errors']) {
                  $this->errors[] = $error;
              }
              $elTpl = preg_replace('!<qf:error>.*</qf:error>!isU', '', $elTpl);
          }
          return $elTpl;
      }
code: public function outputError($elTpl, $error)
      {
          if ($error && !$this->options['group_errors']) {
              $elTpl = str_replace(array('<qf:error>', '</qf:error>', '{error}'),
                                    array('', '', $error), $elTpl);
          } else {
              if ($error && $this->options['group_errors']) {
                  $this->errors[] = $error;
              }
              $elTpl = preg_replace('!<qf:error>.*</qf:error>!isU', '', $elTpl);
          }
          return $elTpl;
      }
code_tokens: public function outputError ( $ elTpl , $ error ) { if ( $ error && ! $ this -> options [ 'group_errors' ] ) { $ elTpl = str_replace ( array ( '<qf:error>' , '</qf:error>' , '{error}' ) , array ( '' , '' , $ error ) , $ elTpl ) ; } else { if ( $ error && $ this -> options [ 'group_errors' ] ) { $ this -> errors [ ] = $ error ; } $ elTpl = preg_replace ( '!<qf:error>.*</qf:error>!isU' , '' , $ elTpl ) ; } return $ elTpl ; }
docstring: Outputs element error, removes empty error blocks
  
  @param    string  Element template
  @param    string  Validation error for the element
  @return   string  Template with error substitutions done
docstring_tokens: Outputs element error removes empty error blocks