Review main Merged

82720[BUGFIX] Reset array keys after filtering available languages

Oli Bartsch CR +2 V +2 Easy +2 −1 updated 01/31/24, 07:32

Commit message

To prevent PHP from encoding the numeric keys
of the available languages as string, which would
lead to JavaScript errors, `array_values` is now
applied to the filtered list of languages.

This resets the keys and therefore ensures a
continuous numeric sequence starting from 0.

Reference: https://www.php.net/manual/en/function.json-encode.php#refsect1-function.json-encode-notes

Review

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

Issues 1

Files 1

Review log 1012

  1. Oli Bartsch uploaded patch set 1 01/30/24, 14:44

  2. core-ci voted on patch set 1 V +1 01/30/24, 14:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/52500

  3. Fabien Udriot voted on patch set 1 CR -1 01/30/24, 15:47

  4. Fabien Udriot voted on patch set 1 CR +1 01/30/24, 15:47

  5. Oliver Klee commented on patch set 1 01/30/24, 16:09

    LanguagePackService.php:78

    We can document this to make this explicit to human readers and PHPStan: `@return list<non-empty-string>`
  6. Oli Bartsch uploaded patch set 2 CR +1 V +1 01/30/24, 16:53

  7. Oli Bartsch commented on patch set 2 01/30/24, 16:53

    LanguagePackService.php:78 Reply

    Done
  8. Oliver Klee voted on patch set 2 CR +1 01/30/24, 16:54

  9. Stefan Bürk voted on patch set 2 CR +1 V +1 01/30/24, 16:57

  10. core-ci voted on patch set 2 V +1 01/30/24, 17:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/52504

  11. Benjamin Franzke voted on patch set 2 CR +2 V +2 01/31/24, 07:30

  12. Benjamin Franzke merged patch set 3 01/31/24, 07:32