Review main Merged

62846[BUGFIX] Cast indexer config to integers before multiplication

Andreas Kienast CR +2 V +2 Easy +2 −2 updated 01/14/20, 16:00

Commit message

If either the options `minAge` or `maxAge` are an empty string, the
corresponding multiplication will fail and a PHP warning is triggered.

As a quick win, the values are casted to integers.

Review

  • Code review CR +2 Done
    • Daniel Goerz +2
    • Georg Ringer +1
    • Oliver Klee +1
    • Jörg Bösche +1
  • Verified V +2 Done
    • Daniel Goerz +2
    • Georg Ringer +1
    • TYPO3com +1 CI

Issues 1

Files 1

Review log 1114

  1. Andreas Kienast uploaded patch set 1 01/10/20, 16:37

  2. TYPO3com voted on patch set 1 V -1 01/10/20, 16:48 Completed build in 11m 00s on Fri, 10 Jan, 04:48 PM Test Summary: 69179 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-39798

  3. Oliver Klee voted on patch set 1 CR +1 01/10/20, 16:53

  4. TYPO3com voted on patch set 1 V +1 01/10/20, 16:57 Completed build in 31m 14s on Fri, 10 Jan, 04:57 PM Test Summary: 69191 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-39798

  5. Tymoteusz Motylewski voted on patch set 1 V +1 CR +1 01/10/20, 21:28

  6. Alexander Schnitzler commented on patch set 1 01/12/20, 12:11

    Indexer.php:454

    Good and easy change. But what if the the config isn't set at all? What about checking that as well in this patch? > $minAge = (int)($this->indexerConfig['minAge'] ?? 0); > $maxAge = (int)($this->indexerConfig['maxAge'] ?? 0);
  7. Andreas Kienast commented on patch set 1 01/12/20, 12:22

    Indexer.php:454 Reply Unresolved

    This would imply somebody fiddles with LocalConfiguration and removes the options. IMO we have that issue everythere in the Core, but I don't mind fixing it here explicitly.
  8. Andreas Kienast commented on patch set 2 01/13/20, 06:44

    Published edit on patch set 1.
  9. TYPO3com voted on patch set 2 V +1 01/13/20, 06:52 Completed build in 08m 22s on Mon, 13 Jan, 06:52 AM Test Summary: 69206 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-39842

  10. Georg Ringer voted on patch set 2 V +1 CR +1 01/13/20, 07:09

  11. Oliver Klee voted on patch set 2 CR +1 01/13/20, 10:46

  12. Jörg Bösche voted on patch set 2 CR +1 01/13/20, 11:00

  13. Daniel Goerz voted on patch set 2 V +2 CR +2 01/14/20, 16:00

  14. Daniel Goerz merged patch set 3 01/14/20, 16:00