Skip to content

Commit

Permalink
Tratamento para SingOn nulo
Browse files Browse the repository at this point in the history
  • Loading branch information
cassioperin-bling committed Nov 12, 2020
1 parent c16bec5 commit 6e6bd41
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/OfxParser/Ofx.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 6e6bd41

Please sign in to comment.