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);