Review main Merged

75091[BUGFIX] Cast `$chars` argument of `fixed_lgd_cs()` to int

Andreas Kienast CR +2 V +2 Normal +29 −27 updated 08/10/22, 07:51

Commit message

Since #97578, `GeneralUtility` is declared strict, potentially breaking
calls to `fixed_lgd_cs()` in at least the "List" module. The argument
`$chars` must be of type int, but sometimes it's a string which breaks
the call of `abs()`.

All calls to this method are adjusted, where required, and the value is
explicitly cast to int.

Review

  • Code review CR +2 Done
    • Stefan Bürk +2
    • Oli Bartsch +1
    • Oliver Klee +1
  • Verified V +2 Done
    • Stefan Bürk +2
    • Oli Bartsch +1
    • core-ci +1 CI

Issues 2

Files 18

Review log 2228

Show 23 earlier messages
  1. Andreas Kienast uploaded patch set 1 07/11/22, 06:26

  2. core-ci voted on patch set 1 V +1 07/11/22, 06:33 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28861

  3. Andreas Kienast uploaded patch set 2 07/11/22, 06:40

  1. core-ci voted on patch set 2 V +1 07/11/22, 06:48 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28863

  2. Francois Suter commented on patch set 2 V +1 CR -1 07/11/22, 07:14

    One small comment on a line which seems leftover from a first attempt at fixing the issue.

    GeneralUtility.php:195

    I guess this is a leftover?
  3. Oliver Klee commented on patch set 3 07/11/22, 07:17

    Published edit on patch set 2.
  4. Oliver Klee commented on patch set 3 CR +1 07/11/22, 07:17

    GeneralUtility.php:195 Reply

    Done
  5. Oliver Klee updated the commit message in patch set 4 07/11/22, 07:18

  6. Oliver Klee voted on patch set 4 CR +1 07/11/22, 07:18

  7. Stefan Bürk voted on patch set 4 V +1 CR +1 07/11/22, 07:23

  8. core-ci voted on patch set 3 V +1 07/11/22, 07:25 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28865

  9. core-ci voted on patch set 4 V +1 07/11/22, 07:26 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28866

  10. Stefan Bürk commented on patch set 4 07/11/22, 07:45

    Should we not add sanity type cast's for second and third argument in `fixed_lgd_cs()` also ? At least until strict argument types are set. $chars has been casted for the if check, but not for the abs() call in there ...
  11. Stefan Bürk commented on patch set 4 CR -1 07/11/22, 07:59

    on it
  12. Andreas Kienast commented on patch set 4 07/11/22, 08:09

    GeneralUtility.php:195 Reply

    Nope, that was intentionally there and I just forgot to un-comment it again.
  13. Stefan Bürk uploaded patch set 5 07/11/22, 08:10

  14. Oliver Klee voted on patch set 5 CR +1 07/11/22, 08:16

  15. core-ci voted on patch set 5 V +1 07/11/22, 08:17 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28867

  16. Stefan Bürk voted on patch set 5 V +1 CR +1 07/11/22, 08:28

  17. Oli Bartsch uploaded patch set 6 07/11/22, 08:29

  18. Oli Bartsch commented on patch set 6 V +1 CR +1 07/11/22, 08:31

    Thanks for taking care Andy!
  19. Oliver Klee voted on patch set 6 CR +1 07/11/22, 08:32

  20. core-ci voted on patch set 6 V +1 07/11/22, 08:36 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28869

  21. Stefan Bürk voted on patch set 6 V +2 CR +2 07/11/22, 08:40

  22. Stefan Bürk merged patch set 7 07/11/22, 08:41

  23. Nikita Hovratov commented on patch set 7 07/11/22, 08:46

    BackendUtility.php:1474

    This can still be a positive integer string.
  24. Oli Bartsch commented on patch set 7 07/11/22, 08:49

  25. Stefan Bürk commented on patch set 7 07/11/22, 13:16

    BackendUtility.php:1474 Reply

    Done