diff --git a/src/MDFe/Damdfe.php b/src/MDFe/Damdfe.php index e9b52bbf..d2f02180 100644 --- a/src/MDFe/Damdfe.php +++ b/src/MDFe/Damdfe.php @@ -167,7 +167,7 @@ private function loadDoc($xml) if (!empty($this->rodo)) { $this->RNTRC = ""; $infANTT = $this->rodo->getElementsByTagName("infANTT")->item(0); - if (isset($infANTT->getElementsByTagName("RNTRC")->item(0)->nodeValue)) { + if (!empty($infANTT) && isset($infANTT->getElementsByTagName("RNTRC")->item(0)->nodeValue)) { $this->RNTRC = $infANTT->getElementsByTagName("RNTRC")->item(0)->nodeValue; } }