protected function isError($key = null)
    {
        if (!isset($key)) {
            return !empty($this->errors);
        }

        $result = $this->getError($key);
        return !empty($result);
    }
protected function isError($key = null)
    {
        if (!isset($key)) {
            return !empty($this->errors);
        }

        $result = $this->getError($key);
        return !empty($result);
    }
protected function isError ( $ key = null ) { if ( ! isset ( $ key ) ) { return ! empty ( $ this -> errors ) ; } $ result = $ this -> getError ( $ key ) ; return ! empty ( $ result ) ; }
Whether an error exists
@param string|null $key
@return boolean
Whether an error exists