From 6e6bd41af8c76bc37699923d397399594cd2f31b Mon Sep 17 00:00:00 2001 From: cassio-bling Date: Thu, 12 Nov 2020 17:57:54 -0300 Subject: [PATCH] Tratamento para SingOn nulo --- lib/OfxParser/Ofx.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/OfxParser/Ofx.php b/lib/OfxParser/Ofx.php index c6a9f8e..255f79f 100644 --- a/lib/OfxParser/Ofx.php +++ b/lib/OfxParser/Ofx.php @@ -80,8 +80,12 @@ public function buildHeader(array $header) * @return SignOn * @throws \Exception */ - protected function buildSignOn(SimpleXMLElement $xml) + protected function buildSignOn(SimpleXMLElement $xml = null) { + if (null === $xml) { + return []; + } + $signOn = new SignOn(); $signOn->status = $this->buildStatus($xml->STATUS); $signOn->date = Utils::createDateTimeFromStr($xml->DTSERVER, true);