Review main Merged

3388[BUGFIX] Unit test checkDateWithInvalidDateValues fails with PHP warning

Steffen Gebert CR +2 V +2 Easy +1 −1 updated 06/03/13, 20:49

Commit message

If TYPO3 is configured to not suppress PHP warnings, the unit test
'checkDateWithInvalidDateValues with data set "Not Good"'
of Testsuite tx_scheduler_ModuleTest fails.

As it tries to insert non-numeric values into mkstring(), this warning
is raised.

We can safely suppress the output of PHP warnings for the mktime call,
as afterwards its return value is checked.

Review

  • Code review CR +2
    • Helmut Hummel +2
    • Stefan Neufeind +1
  • Verified V +2
    • Helmut Hummel +2
    • Stefan Neufeind +1

Issues 1

Files 1

Review log 6

  1. Stefan Neufeind commented on patch set 1 07/17/11, 19:57

    Why not better just cast the values to int "cleanly"?
  2. Stefan Neufeind commented on patch set 1 07/17/11, 19:57

    Verified; Looks good to me, but someone else must approve You are right, it wouldn't return FALSE (but not an exception actually). Tested and works fine. For others: Test in in the scheduler-testsuite.
  3. Steffen Gebert commented on patch set 1 07/17/11, 19:57

    Then all parameters end up with 0 and mktime() accepts them (but doesn't throw the exception)
  4. Mr. Jenkins commented on patch set 1 07/17/11, 19:57

  5. Helmut Hummel commented on patch set 1 V 0 07/17/11, 19:57

    by team member; Looks good to me, approved
  6. Helmut Hummel merged patch set 1 07/17/11, 19:57