ofxparser icon indicating copy to clipboard operation
ofxparser copied to clipboard

Cast entities values assignments

Open beroso opened this issue 8 years ago • 0 comments

The parser are storing SimpleXML elements in the entities properties. I think, for example, the code from Parser::buildCreditAccount:

....
$bankAccount->accountNumber = $statementResponse->BANKACCTFROM->ACCTID;
$bankAccount->routingNumber = $statementResponse->BANKACCTFROM->BANKID;
$bankAccount->accountType = $statementResponse->BANKACCTFROM->ACCTTYPE;
....

should be:

....
$bankAccount->accountNumber = (string)$statementResponse->BANKACCTFROM->ACCTID;
$bankAccount->routingNumber = (string)$statementResponse->BANKACCTFROM->BANKID;
$bankAccount->accountType = (string)$statementResponse->BANKACCTFROM->ACCTTYPE;
....

beroso avatar Jun 02 '17 18:06 beroso