diff --git a/src/MDFe/Damdfe.php b/src/MDFe/Damdfe.php index 219d43cf..2e97621e 100644 --- a/src/MDFe/Damdfe.php +++ b/src/MDFe/Damdfe.php @@ -168,8 +168,10 @@ private function loadDoc($xml) if (!empty($this->rodo)) { $this->RNTRC = ""; $infANTT = $this->rodo->getElementsByTagName("infANTT")->item(0); - if (!empty($infANTT) && isset($infANTT->getElementsByTagName("RNTRC")->item(0)->nodeValue)) { - $this->RNTRC = $infANTT->getElementsByTagName("RNTRC")->item(0)->nodeValue; + if(isset($infANTT)){ + if (isset($infANTT->getElementsByTagName("RNTRC")->item(0)->nodeValue)) { + $this->RNTRC = $infANTT->getElementsByTagName("RNTRC")->item(0)->nodeValue; + } } } $this->ciot = "";