Skip to content
This repository has been archived by the owner on Sep 8, 2020. It is now read-only.

Handle the issue with FNB's multiple elements on a single line which … #35

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

jacques
Copy link
Contributor

@jacques jacques commented Jan 6, 2017

…throws 'RuntimeException: Failed to initialize DateTime for string:'

…throws 'RuntimeException: Failed to initialize DateTime for string:'
@asgrim
Copy link
Owner

asgrim commented Jan 7, 2017

Hmm, not currently sure how to make this more clever regarding the various ways the OFXs are generated. Ideally, we need to conform to spec (we'd need to read up on it), and if an OFX doesn't follow spec, then it wouldn't be supported...

@asgrim asgrim added the bug This is a bug report issue or PR that fixes a bug label Jan 7, 2017
Copy link
Owner

@asgrim asgrim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rejecting for now as it's breaking existing support for other line endings (that's a no-go unless targeting a BC break release)

@asgrim
Copy link
Owner

asgrim commented Jun 22, 2017

@jacques what are the differences here in the 2.00 format please? Does it actually warrant a second class? Also missing tests for this new class :/

@asgrim asgrim added BC break Changes in this PR/issue would result in a BC break needs tests PR that needs tests added labels Oct 29, 2018
Marcelo Cerqueira and others added 9 commits January 21, 2019 17:22
Some OFX files don't have all the date tags. 
So when the value of the date tag that doesn't exist and it is passed as a parameter to $dateString into the function "createDateTimeFromStr", this function returns "=> Failed to initialize DateTime for string:  ".
To bring more flexibility, I suggest testing first if dateString is set and is not empty before converting it into a string.
In OFX files, some tag values like in MEMO tag contains special characters such as the 'at' sign (@) which generate an issue with simplexml_load_string function. 

`LibXMLError::__set_state(array(      'level' => 3,      'code' => 68,      'column' => 30,      'message' => 'xmlParseEntityRef: no name ',      'file' => '',      'line' => 27,   )),`

This code simply converts the '&' sign to its html code (&) which is tolerated by simplexml_load_string.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
BC break Changes in this PR/issue would result in a BC break bug This is a bug report issue or PR that fixes a bug needs tests PR that needs tests added
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants