51399[BUGFIX] Fix runtime-error in traverseFlexFormXMLData
Commit message
Review
-
Code review CR +2
- Markus Klein +2
- Christian Kuhn +1
-
Verified V +2
- Markus Klein +2
- Christian Kuhn +1
Files 1
Review log 1316
-
Thomas Hohn uploaded patch set 1 01/23/17, 12:11
-
TYPO3com voted on patch set 1 V +1 01/23/17, 12:16 Completed build in 05m 13s on Mon, 23 Jan, 01:16 PM Test Summary: 55161 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6929
-
Thomas Hohn updated the commit message in patch set 2 01/23/17, 20:21
-
TYPO3com voted on patch set 2 V +1 01/23/17, 20:28 Completed build in 06m 14s on Mon, 23 Jan, 09:28 PM Test Summary: 55161 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6947
-
Markus Klein commented on patch set 2 01/24/17, 22:26
How can it happen that this is not an array? -
Thomas Hohn commented on patch set 2 01/25/17, 05:25
In the current case we have a table with an flexform called questions. This table holds different kind of questions - some have a flexform some don't since these question types are located in different extensions. So if you change a question from a type with flexform one without some "garbage" could be left in the flexform (mean nothing in the application) but the flexform can't be parsed due to a missing flexform.xml - says my initial investigations. This makes the array empty. So like testing for other conditions in the method I think it makes sense to test for this condition instead of just returning an run-time error and this make the indexing more robust -
Markus Klein commented on patch set 2 01/25/17, 21:00
Phew... this shouts for a functional test Please add all this information to the ticket and provide a test extension/code for reviewers to have a chance to reproduce. -
Christian Kuhn commented on patch set 2 01/26/17, 00:12
could you please add some example xml of the "invalid" flex form in question? at first glance it seems to me that if 'sheets' is defined in any way, it always must be an array, otherwise quite some follow-up issues may arise or throw follow-up exceptions. at the moment i don't see a reason why 'sheets' could be defined but not exist in a legitimate case, please elaborate a bit deeper with use cases in the forge issue to see if this case is valid and if it really should be allowed. -
Thomas Hohn commented on patch set 2 01/26/17, 09:07
The following XML snippet will make the traverseFlexFormXMLData throw an runtime-error: <?xml version="1.0" encoding="utf-8" standalone="yes"?> <T3DataStructure> <ROOT></ROOT> </T3DataStructure> I still believe that it's better to return an error then just throw an run-time error. -
Thomas Hohn commented on patch set 2 02/01/17, 04:35
Any news on this one Markus and/or Christian? -
Thomas Hohn commented on patch set 2 02/08/17, 06:02
I would appreciate your feedback on this on Christian -
Christian Kuhn rebased onto patch set 3 02/20/17, 19:55
-
Christian Kuhn commented on patch set 3 CR +1 V +1 02/20/17, 19:57
ok, fine with me. sorry for the delay. note: it is not trivial to write a test for this method with the callback stuff and quite some dependencies. the code change is actually pretty obvious however and i currently have no time to spend an hour to come up with one or two working tests ... so, i'd buy that patch without unit test if nobody feels entitled to step in here. -
Markus Klein commented on patch set 3 CR +2 V +2 02/20/17, 20:00
okay, fine as well. lets go -
Gerrit merged patch set 3 02/20/17, 20:00
-
TYPO3com commented on patch set 3 02/20/17, 20:01 Completed build in 05m 57s on Mon, 20 Feb, 09:01 PM Test Summary: 56381 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8319