From 34c8292fe15e3d350dfa413e1eb8819a968c4b3d Mon Sep 17 00:00:00 2001 From: robmachado Date: Thu, 16 Nov 2023 18:00:19 -0300 Subject: [PATCH] =?UTF-8?q?Ajuste=20no=20SoapCurl=20quando=20n=C3=A3o=20?= =?UTF-8?q?=C3=A9=20retornado=20um=20XML?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Soap/SoapCurl.php | 3 +++ 1 file changed, 3 insertions(+) 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; }