Review main Merged

5327[BUGFIX] Don't save form protection error messages in session

Helmut Hummel CR +2 V +2 Easy +35 −8 updated 06/03/13, 20:49

Commit message

Do not persist flash messages in the session if we are in an Ajax context
because then the flash message is rendered out of context the next time
the flash message queue is flushed.

Review

  • Code review CR +2
    • Tolleiv Nietsch +2
    • Georg Ringer +1
    • Oliver Klee +1
    • Philipp Gampe +1
  • Verified V +2
    • Tolleiv Nietsch +2
    • Georg Ringer +1
    • Philipp Gampe +1

Issues 1

Files 2

Review log 19

  1. Oliver Klee commented on patch set 1 02/07/12, 07:27

    I would prefer that you didn't submit this
    trailing whitespace

    class.t3lib_formprotection_backendformprotection.php:134

    I'd prefer this to be in a local variable "inAjaxContext" or something like that. Then you don't need the comment either. (This comment is a sign that the code is not clear enough.)

    class.t3lib_formprotection_BackendFormProtectionTest.php:237

    Please use assertNotEmpty instead (as the first assertion before the assertContains). The general rule is: No conditions in unit tests (except for an if for cases when a test needs to be skipped, e.g., for certain TYPO3 versions or when a PHP extension is not installed).

    class.t3lib_formprotection_BackendFormProtectionTest.php:238

    I'd prefer an assertNotEmpty here so we don't need to have any conditional logic inside the unit tests. (The test function will exit at the point where an assertion fails.)

    class.t3lib_formprotection_BackendFormProtectionTest.php:259

    Ditto.

    class.t3lib_formprotection_BackendFormProtectionTest.php:259

    Ditto.
  2. Oliver Klee commented on patch set 2 2 comments 02/07/12, 07:27

    I would prefer that you didn't submit this
  3. Oliver Klee commented on patch set 2 02/07/12, 07:27

    (1 inline comment)
  4. Oliver Hader uploaded patch set 2 02/07/12, 07:27

  5. Oliver Hader commented on patch set 2 02/07/12, 07:27

    I would prefer that you didn't submit this Rebasing to master V:0, R:-1 V:0, R:-1 from Oliver Klee <typo3-coding@oliverklee.de> V:0, R:1 from Georg Ringer <mail@ringerge.org>
  6. Helmut Hummel commented on patch set 2 02/07/12, 07:27

    (2 inline comments)

    class.t3lib_formprotection_BackendFormProtectionTest.php:238 Reply

    How to avoid the PHP fatal error then if $messages is empty? $messages[0]->render()

    class.t3lib_formprotection_BackendFormProtectionTest.php:238 Reply

    Ah, OK cool. I didn't know that.

    class.t3lib_formprotection_BackendFormProtectionTest.php:259 Reply

    ditto
  7. Helmut Hummel commented on patch set 2 02/07/12, 07:27

    (1 inline comment)
  8. Tolleiv Nietsch commented on patch set 3 V 0 02/07/12, 07:27

    by team member; Looks good to me, approved Good one :)
  9. Oliver Klee commented on patch set 3 02/07/12, 07:27

    Looks good to me, but someone else must approve
  10. Helmut Hummel uploaded patch set 3 02/07/12, 07:27

  11. Helmut Hummel commented on patch set 3 02/07/12, 07:27

    (1 inline comment)
  12. Georg Ringer commented on patch set 1 02/07/12, 07:27

    Looks good to me, but someone else must approve
  13. Philipp Gampe commented on patch set 3 02/07/12, 07:27

    (1 inline comment)

    class.t3lib_formprotection_BackendFormProtectionTest.php:249

    what does this test do, which is not tested before?
  14. Philipp Gampe commented on patch set 3 02/07/12, 07:27

    Verified; Looks good to me, but someone else must approve Ah ok.
  15. Mr. Jenkins commented on patch set 1 02/07/12, 07:27

  16. Mr. Jenkins commented on patch set 2 02/07/12, 07:27

  17. Mr. Jenkins commented on patch set 3 02/07/12, 07:27

  18. Georg Ringer commented on patch set 3 02/07/12, 07:27

    Verified; Looks good to me, but someone else must approve
  19. Georg Ringer merged patch set 3 02/07/12, 07:27