Review main Merged

27362[BUGFIX] Fix PHP warnings on fe_user log out

Markus Klein CR +2 V +2 Easy +7 −6 updated 03/03/14, 20:50

Commit message

PHP Warning: Illegal string offset is thrown in some places
if an fe_user logs out.

Review

  • Code review CR +2
    • Stefan Neufeind +2
    • Alexander Opitz +1
    • Oliver Klee +1
    • Xavier Perseguers +1
  • Verified V +2
    • Stefan Neufeind +2
    • Xavier Perseguers +1

Issues 1

Files 3

Review log 27

Show 2 earlier messages
  1. Wouter Wolters voted on patch set 1 CR +1 02/05/14, 16:23

  2. Mr. Jenkins commented on patch set 1 02/05/14, 16:49

  1. Stefan Neufeind voted on patch set 1 CR +1 02/07/14, 10:14

  2. Dmitry Dulepov commented on patch set 1 02/18/14, 09:01

    I'd give it a +1 except that I did not like the change of a method signature. This should be avoided in public methods.

    AbstractUserAuthentication.php:1172

    Note: this is a [not really useful] change in a public API function.
  3. Markus Klein commented on patch set 1 02/18/14, 09:22

    AbstractUserAuthentication.php:1172 Reply

    ?? What does that change? Am I blind?
  4. Stefan Neufeind commented on patch set 1 02/18/14, 10:31

    AbstractUserAuthentication.php:1172 Reply

    I'm with Markus here. It's just the default and still has the same effect.
  5. Xavier Perseguers commented on patch set 1 02/22/14, 02:01

    AbstractUserAuthentication.php:1172 Reply

    This is the same except when subclassing. If someone subclassed this class (which is done because it is abstract) and overrode this method, then he will have to adapt to the change of signature otherwise PHP will complain. This is the reason why Dmitry is unhappy with this change, and I can understand it
  6. Markus Klein commented on patch set 1 02/22/14, 11:33

    AbstractUserAuthentication.php:1172 Reply

    Hm.. I tested that. PHP does not care about the default value. abstract class A { public function c($a = FALSE) { echo 'A'; } } class B extends A { public function c($a = '') { echo 'B'; } } $b = new B(); $b->c(); Works without PHP warning
  7. Xavier Perseguers voted on patch set 1 CR +1 02/22/14, 19:55

  8. Stefan Neufeind commented on patch set 1 02/23/14, 10:13

    Dmitry: Given the tests by Markus, would you be fine now this with change? I'd like to propose to merge this in 48 hours (or earlier if somebody feels like it).
  9. Stefan Neufeind commented on patch set 1 02/24/14, 23:04

    Dmitry, could you please comment on the comments for your initial thought? Is it okay as proposed by the patch now? It would be great imho to proceed with this rather small fix imho ...
  10. Dmitry Dulepov commented on patch set 1 02/25/14, 12:19

    Please, see my comment. In general: all changes should be about the patch. This patch is to fix warnings but it changes something that does not cause any warnings. So it does not belong to this patch. It should not be there. Make a clean up patch if you want to change this, please. I will be happy to review, test and give +2s to both patches. It is just cleaner this way.

    AbstractUserAuthentication.php:1172 Reply

    I see no useful change here. Don;t change just because you can, ok? This has no relation to the problem you fix, so this should not be in this patch.
  11. Markus Klein uploaded patch set 2 02/25/14, 13:14

  12. Wouter Wolters voted on patch set 2 CR +1 02/25/14, 21:16

  13. Oliver Klee voted on patch set 2 CR +1 02/25/14, 21:22

  14. Dmitry Dulepov commented on patch set 2 V +1 CR +2 02/26/14, 12:06

    I did not see warnings before the patch but it works after applying it. So +1 for testing and +2 for code review.
  15. Xavier Perseguers voted on patch set 2 CR +1 03/01/14, 00:51

  16. Stefan Neufeind commented on patch set 2 03/02/14, 08:10

    Not a big deal and ready maybe?
  17. Xavier Perseguers commented on patch set 2 V -1 03/03/14, 08:21

    I still have 1 warning: #1: PHP Warning: Illegal string offset 'uid' in typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php
  18. Xavier Perseguers uploaded patch set 3 03/03/14, 08:23

  19. Xavier Perseguers voted on patch set 3 V +1 CR +1 03/03/14, 08:24

  20. Mr. Jenkins commented on patch set 3 03/03/14, 08:36

  21. Oliver Klee voted on patch set 3 CR +1 03/03/14, 10:34

  22. Alexander Opitz voted on patch set 3 CR +1 03/03/14, 15:33

  23. Stefan Neufeind voted on patch set 3 V +2 CR +2 03/03/14, 18:59

  24. Stefan Neufeind merged patch set 4 03/03/14, 18:59

  25. Jigal van Hemert commented on patch set 4 03/03/14, 20:50

    TypoScriptFrontendController.php:3764

    Problem occurs if no user is logged in, so check if ->fe_user->user is not NULL, but an array. The field 'uid' is not hardcoded, but defined in fe_user->userid_column (in the constructor).

    TypoScriptFrontendController.php:3768

    Username field is defined in ->fe_user->username_column, not hardcoded.

    TypoScriptFrontendController.php:3773

    Here also ->fe_user->userid_column contains name of field with id.