Review main Abandoned

55929[BUGFIX] Set correct default values for TSFE member variables

Wolfgang Klinger CR 0 V 0 Easy +18 −18 updated 08/29/18, 07:19

Commit message

Set correct default values that match the specified
variable type.
This prevents exceptions in certain circumstances
(e.g. when used with count).

Review

  • Code review CR 0
  • Verified V 0

Issues 1

Files 1

Review log 1518

  1. Wolfgang Klinger uploaded patch set 1 02/27/18, 18:41

  2. Benni Mack commented on patch set 1 02/27/18, 18:46

    do you have examples on how to get exceptions and how to re-produce? Also, TSFE is a really dangerous place to backport these changes to v8 and v7, if this is uncritical, I'd be in favor of only doing this in master.
  3. TYPO3com voted on patch set 1 V +1 02/27/18, 18:49 Completed build in 08m 24s on Tue, 27 Feb, 07:49 PM Test Summary: 30880 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-20235

  4. Wolfgang Klinger commented on patch set 1 02/27/18, 18:51

    I stumbled upon this while testing #50805 and created a shortcut page with an invalid target. In this case $this->rootLine stays an empty string and used with count() it throws an exception. I think it's uncritical.
  5. Mathias Schreiber updated the commit message in patch set 2 03/08/18, 12:40

  6. Mathias Schreiber voted on patch set 2 V +1 CR +1 03/08/18, 12:40

  7. TYPO3com voted on patch set 2 V +1 03/08/18, 12:50 Completed build in 10m 06s on Thu, 8 Mar, 01:50 PM Test Summary: 30819 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-20684

  8. Markus Klein commented on patch set 2 03/08/18, 12:58

    Did you check all usages of those members? AFAIK there have been places where those members are checked for the (invalid) default value.
  9. Wolfgang Klinger uploaded patch set 3 03/09/18, 05:56

  10. Wolfgang Klinger commented on patch set 3 03/09/18, 05:58

    Thanks for the hint, I checked every modified variable and fixed 3 problem areas.
  11. TYPO3com voted on patch set 3 V +1 03/09/18, 06:04 Completed build in 08m 19s on Fri, 9 Mar, 07:04 AM Test Summary: 30837 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-20728

  12. Tobi Kretschmann voted on patch set 3 CR +1 03/09/18, 06:39

  13. Markus Klein commented on patch set 3 03/09/18, 22:02

    Since these are public properties, did you also check if any other code assigns an invalid datatype from outside? I know this is nasty, but we deal with public properties here that are around for ages, hence there is a lot of potential to introduce micro-regressions. (me: been there, done that ^^)
  14. Oliver Klee voted on patch set 3 CR +1 03/10/18, 09:07

  15. Daniel Goerz voted on patch set 3 CR +1 03/12/18, 09:31

  16. Wolfgang Klinger commented on patch set 3 03/12/18, 16:03

    I checked all modified member variables like `grep -r "\->rootLine = " *` inside typo3/sysext and could not spot any wrong assignments.
  17. Christian Kuhn commented on patch set 3 CR -1 03/12/18, 22:19

    i tend to -1 this change: it is VERY hard to see possible impact and the patch is potentially b/w breaking. maybe we could just skip it since a lot is going on in TSFE anyway currently with the psr-15 & routing works.
  18. Wolfgang Klinger abandoned the change 08/29/18, 07:19