diff --git a/src/Soap/SoapCurl.php b/src/Soap/SoapCurl.php index 9585f45..dcfca67 100755 --- a/src/Soap/SoapCurl.php +++ b/src/Soap/SoapCurl.php @@ -148,6 +148,9 @@ public function send( if (empty($this->responseBody)) { throw SoapException::soapFault('Retorno da SEFAZ VAZIO', 99); } + if (!Validator::isXML($this->responseBody)) { + throw SoapException::soapFault('O retorno não é um XML ' . $this->responseBody, 99); + } return $this->responseBody; }