public function errors($exit_on_error = false)
    {
        if (!empty($this->errors)) {

            foreach (gplcart_array_flatten($this->errors) as $error) {
                $this->error($error);
            }

            $this->errors = array();

            if ($exit_on_error) {
                $this->abort(1);
            }
        }
    }
public function errors($exit_on_error = false)
    {
        if (!empty($this->errors)) {

            foreach (gplcart_array_flatten($this->errors) as $error) {
                $this->error($error);
            }

            $this->errors = array();

            if ($exit_on_error) {
                $this->abort(1);
            }
        }
    }
public function errors ( $ exit_on_error = false ) { if ( ! empty ( $ this -> errors ) ) { foreach ( gplcart_array_flatten ( $ this -> errors ) as $ error ) { $ this -> error ( $ error ) ; } $ this -> errors = array ( ) ; if ( $ exit_on_error ) { $ this -> abort ( 1 ) ; } } }
Print and clear up all existing errors
@param boolean $exit_on_error
Print and clear up all existing errors