Review main Merged

23183[BUGFIX] FlashMessageQueue PHP strict warning

Christian Kuhn CR +2 V +2 Easy +7 −1 updated 08/20/13, 18:00

Commit message

FlashMessageQueue exends \SplQueue and overwrites enqueue($value).
In \SplQueue enqueue() has no type hint on $value, but
FlashMessageQueue adds a type hint to FlashMessage. This raises
a PHP strict warning.

Solution is to remove the type hint and add an exception instead
if given argument is not an instance of FlashMessage.

Review

  • Code review CR +2
    • Wouter Wolters +2
    • Helmut Hummel +1
  • Verified V +2
    • Wouter Wolters +2
    • Helmut Hummel +1

Issues 1

Files 1

Review log 20

  1. Mr. Jenkins commented on patch set 1 08/18/13, 13:59

  2. Helmut Hummel updated the commit message in patch set 1 08/18/13, 14:00

  3. Mr. Jenkins commented on patch set 2 08/18/13, 14:00

  4. Philipp Gampe voted on patch set 2 CR +1 08/18/13, 14:09

  5. Helmut Hummel commented on patch set 2 08/19/13, 08:46

    FlashMessageQueue.php:62

    I would include the given type in the exception
  6. Wouter Wolters uploaded patch set 3 08/20/13, 17:40

  7. Mr. Jenkins commented on patch set 3 08/20/13, 17:41

  8. Wouter Wolters commented on patch set 3 V +1 CR +1 08/20/13, 17:41

    Exception now looks like: #1376833554: enqueue() expects an object of type \TYPO3\CMS\Core\Messaging\FlashMessage but is of type "stdClass"
  9. Helmut Hummel uploaded patch set 4 08/20/13, 17:49

  10. Helmut Hummel voted on patch set 4 V +1 CR +1 08/20/13, 17:50

  11. Mr. Jenkins commented on patch set 4 08/20/13, 17:50

  12. Helmut Hummel uploaded patch set 5 08/20/13, 17:56

  13. Helmut Hummel voted on patch set 5 V +1 CR +1 08/20/13, 17:57

  14. Mr. Jenkins commented on patch set 5 08/20/13, 17:57

  15. Helmut Hummel uploaded patch set 6 08/20/13, 17:58

  16. Mr. Jenkins commented on patch set 6 08/20/13, 17:58

  17. Helmut Hummel voted on patch set 6 V +1 CR +1 08/20/13, 17:59

  18. Wouter Wolters voted on patch set 6 V +2 CR +2 08/20/13, 17:59

  19. Wouter Wolters merged patch set 7 08/20/13, 17:59

  20. Wouter Wolters commented on patch set 7 08/20/13, 18:00

    Cherry Picked This patchset was cherry picked to change: I882aab33a55d84de6614a45c6cc045223adba0cd