29343[BUGFIX] Properly check existence of array item
Commit message
Review
-
Code review CR +2
- Markus Klein +2
- Stefan Neufeind +1
- Julian Wundrak +1
- Oliver Klee +1
- Wouter Wolters +1
- Stefan Froemken +1
-
Verified V +2
- Markus Klein +2
- Julian Wundrak +1
- Stefan Froemken +1
- Jost Baron +1
Issues 1
Files 1
Review log 33
Show 8 earlier messages
-
Oliver Klee commented on patch set 1 04/10/14, 16:07
ContentObjectRenderer.php:1184Maybe move this part into the guard clause with the continue above? -
Mr. Jenkins commented on patch set 1 04/10/14, 16:17
Build Successful https://ci.typo3.org/job/typo3-v4-core-gerrit/15925/ : SUCCESS -
Stefan Neufeind commented on patch set 1 04/10/14, 16:26
ContentObjectRenderer.php:1164ReplyFlexform-data comes as XML inside a string. Not right?ContentObjectRenderer.php:1184ReplyHow? This isset-check can only proceed *if* it is an array. -
Stefan Neufeind commented on patch set 1 04/10/14, 16:30
ContentObjectRenderer.php:1164ReplyOkay, got it now - by looking at more than just the short excerpt :-) So it would be string|array -
Oliver Klee commented on patch set 1 04/12/14, 07:42
ContentObjectRenderer.php:1184ReplyI was thinking along the line of this: if (!is_array || !isset()) {continue} However, I missed the other if isset($value[vDef]) below. So we cannot consolidate both ifs here. -
Markus Klein uploaded patch set 2 04/12/14, 09:11
-
Mr. Jenkins commented on patch set 2 04/12/14, 09:24
Build Successful https://ci.typo3.org/job/typo3-v4-core-gerrit/15944/ : SUCCESS -
Oliver Klee voted on patch set 2 CR +1 04/12/14, 10:47
-
Christian Kuhn commented on patch set 2 04/12/14, 10:54
ContentObjectRenderer.php:1177can't this is_array check be moved above the isset() check? -
Oliver Klee commented on patch set 2 CR -1 04/12/14, 10:59
ContentObjectRenderer.php:1177ReplyThat's what I though as well. However, $flexData might be overwritten in lines 1175. I think we should have different variables for this instead of just overwriting the same variable again and again. (That's a smell from the Refactoring book IIRC.) -
Christian Kuhn commented on patch set 2 CR -1 04/12/14, 13:13
-1, I'll refactor this a bit now. -
Christian Kuhn uploaded patch set 3 04/12/14, 13:36
-
Christian Kuhn voted on patch set 3 CR -1 04/12/14, 13:37
-
Christian Kuhn uploaded patch set 4 04/12/14, 13:38
-
Christian Kuhn commented on patch set 4 CR -1 04/12/14, 13:39
Just moved the early return more up but stayed with the variable name (trying to change that does not lead to much better readable code in this case). Anyway, this patch would be a good opportunity to add a basic test coverage for this method, so -1 from me until this is done. -
Mr. Jenkins commented on patch set 3 04/12/14, 13:50
Build Successful https://ci.typo3.org/job/typo3-v4-core-gerrit/15960/ : SUCCESS -
Mr. Jenkins commented on patch set 4 04/12/14, 13:51
Build Successful https://ci.typo3.org/job/typo3-v4-core-gerrit/15961/ : SUCCESS -
Oliver Klee commented on patch set 4 04/12/14, 14:27
ContentObjectRenderer.php:1179Couldn't we then run into a case where $flexData is not an array anymore at this point? -
Markus Klein commented on patch set 4 CR -1 04/12/14, 14:31
ContentObjectRenderer.php:1179ReplyThat's why I moved the isset() check up, to ensure that we have an array before the foreach loop -
Markus Klein uploaded patch set 5 04/12/14, 14:33
-
Mr. Jenkins commented on patch set 5 04/12/14, 14:47
Build Successful https://ci.typo3.org/job/typo3-v4-core-gerrit/15964/ : SUCCESS -
Oliver Klee voted on patch set 5 CR +1 04/12/14, 17:08
-
Christian Kuhn commented on patch set 5 04/12/14, 17:11
still it would be great to have test coverage for this method, afaik anja is working on that already. -
Stefan Neufeind commented on patch set 5 04/12/14, 19:11
@Anja: Are you active in this area? Results soon maybe or a partial result (of a larger changeset) that you could contribute to this patchset here? -
Anja Leichsenring commented on patch set 5 04/13/14, 11:42
I try to come up with some tests, but currently can't get the input working. So if someone can show me some possible values, that might be passed to this method, I would be grateful. In every case I can not deliver today. -
Jost Baron voted on patch set 5 V +1 04/24/14, 23:13
-
Wouter Wolters voted on patch set 5 CR +1 04/29/14, 18:36
-
Julian Wundrak voted on patch set 5 V +1 CR +1 04/29/14, 18:40
-
Stefan Neufeind commented on patch set 5 CR +1 04/29/14, 22:01
@Anja: Do you expect it's realistic to wait for a testcase? Or do you think you won't make it "soon"? -
Stefan Froemken commented on patch set 5 V +1 CR +1 04/30/14, 08:35
ContentObjectRenderer.php:1184What do think about the count here? Can we remove it? WW told me in one of my patches that "count" is expensive. -
Oliver Klee commented on patch set 5 04/30/14, 10:38
ContentObjectRenderer.php:1184ReplyYes, for arrays, empty() instead of count() > 0 would be faster. I wouldn't vote a -1 for this here, though, so we can get this change in quickly. -
Markus Klein commented on patch set 5 V +2 CR +2 05/06/14, 10:16
This has enough votes for a long time now. -
Markus Klein merged patch set 6 05/06/14, 10:16
ContentObjectRenderer.php:1164