original_string: public function error($key = null, $return_error = null, $return_no_error = '')
      {
          if (isset($key)) {
              $result = gplcart_array_get($this->errors, $key);
          } else {
              $result = empty($this->errors) ? null : $this->errors;
          }
  
          if (isset($result)) {
              return isset($return_error) ? $return_error : $result;
          }
  
          return $return_no_error;
      }
code: public function error($key = null, $return_error = null, $return_no_error = '')
      {
          if (isset($key)) {
              $result = gplcart_array_get($this->errors, $key);
          } else {
              $result = empty($this->errors) ? null : $this->errors;
          }
  
          if (isset($result)) {
              return isset($return_error) ? $return_error : $result;
          }
  
          return $return_no_error;
      }
code_tokens: public function error ( $ key = null , $ return_error = null , $ return_no_error = '' ) { if ( isset ( $ key ) ) { $ result = gplcart_array_get ( $ this -> errors , $ key ) ; } else { $ result = empty ( $ this -> errors ) ? null : $ this -> errors ; } if ( isset ( $ result ) ) { return isset ( $ return_error ) ? $ return_error : $ result ; } return $ return_no_error ; }
docstring: Returns a value if an error occurred
  @param string|array $key
  @param mixed $return_error
  @param mixed $return_no_error
  @return mixed
docstring_tokens: Returns a value if an error occurred