Review main Merged

23116[BUGFIX] Fix PHP warning when writing to Backend user log

Alexander Stehlik CR +2 V +2 Easy +6 −2 updated 09/19/13, 20:03

Commit message

The writelog method for the BackendUserAuthentication object is now
checking if there is actually an uid available in the user array
before it tries to access it.

This prevents a PHP warning about an illegal string offset when writing
log messages in an authentication service.

Review

  • Code review CR +2
    • Christian Kuhn +2
    • Markus Klein +1
  • Verified V +2
    • Christian Kuhn +2
    • Markus Klein +1

Issues 1

Files 1

Review log 15

  1. Mr. Jenkins commented on patch set 1 08/15/13, 16:06

  2. Stefan Neufeind commented on patch set 1 CR +1 08/20/13, 12:24

    BackendUserAuthentication.php:2070

    Maybe isset would be an "easier" alternative to array_key_exists? But that's just a personal taste. Functionally both ways work fine.
  3. Markus Klein uploaded patch set 2 09/19/13, 06:27

  4. Markus Klein voted on patch set 2 V +1 CR +1 09/19/13, 06:27

  5. Mr. Jenkins commented on patch set 2 09/19/13, 06:43

  6. Alexander Stehlik commented on patch set 2 CR -1 09/19/13, 06:55

    Thanks for the update. Please see my inline comments.

    BackendUserAuthentication.php:2058

    If you use isset() the is_array() check is not required any more (no notice will be issued if $this->user is not an array)

    BackendUserAuthentication.php:2399

    Newline after ?>
  7. Markus Klein commented on patch set 2 09/19/13, 08:02

    BackendUserAuthentication.php:2058 Reply

    of course. will change that

    BackendUserAuthentication.php:2399 Reply

    Not a problem as long as there's no empty line at the end. (\n\n after ?>)
  8. Markus Klein uploaded patch set 3 09/19/13, 08:05

  9. Mr. Jenkins commented on patch set 3 09/19/13, 08:26

  10. Alexander Stehlik commented on patch set 3 09/19/13, 08:53

    Thanks for the update. If you say one trailing \n is not a problem I believe you :) Since this patch is originally from me I'm not sure if I should vote for it?
  11. Markus Klein voted on patch set 3 V +1 CR +1 09/19/13, 16:00

  12. Christian Kuhn voted on patch set 3 V +2 CR +2 09/19/13, 20:03

  13. Christian Kuhn merged patch set 4 09/19/13, 20:03

  14. Christian Kuhn commented on patch set 4 09/19/13, 20:03

    Cherry Picked This patchset was cherry picked to change: I006c6b0ccd8f03292715a7d7ab8e457914637d93
  15. Christian Kuhn commented on patch set 4 09/19/13, 20:03

    Cherry Picked This patchset was cherry picked to change: I006c6b0ccd8f03292715a7d7ab8e457914637d93