original_string: public function hasErrors($message = true)
      {
          if (empty($this->errors)) {
              return false;
          }
  
          if ($message) {
              $this->setMessage($this->text('One or more errors occurred'), 'danger');
          }
  
          if (isset($this->post_key)) {
              $this->setData($this->post_key, $this->submitted);
          }
  
          return true;
      }
code: public function hasErrors($message = true)
      {
          if (empty($this->errors)) {
              return false;
          }
  
          if ($message) {
              $this->setMessage($this->text('One or more errors occurred'), 'danger');
          }
  
          if (isset($this->post_key)) {
              $this->setData($this->post_key, $this->submitted);
          }
  
          return true;
      }
code_tokens: public function hasErrors ( $ message = true ) { if ( empty ( $ this -> errors ) ) { return false ; } if ( $ message ) { $ this -> setMessage ( $ this -> text ( 'One or more errors occurred' ) , 'danger' ) ; } if ( isset ( $ this -> post_key ) ) { $ this -> setData ( $ this -> post_key , $ this -> submitted ) ; } return true ; }
docstring: Returns true if an error occurred and pass back to template the submitted data
  @param boolean $message
  @return boolean
docstring_tokens: Returns true if an error occurred and pass back to template the submitted data