90059[BUGFIX] Let Country object retrieval handle NULL value
Commit message
Review
-
Code review CR +2 Done
- Garvin Hicking +2
- Oliver Klee +1
- Sebastian Iffland +1
- Oliver Hader +1
- Simon Schaufelberger +1
-
Verified V +2 Done
- Garvin Hicking +2
- Oliver Klee +1
- Oliver Hader +1
- Simon Schaufelberger +1
- core-ci +1 CI
Issues 1
Files 4
Review log 2429
Show 34 earlier messages
-
Garvin Hicking uploaded patch set 1 07/13/25, 10:12
-
core-ci voted on patch set 1 V +1 07/13/25, 10:19 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/81655
-
Oliver Klee commented on patch set 1 07/14/25, 07:52
issue ID is still missingCountryProviderTest.php:55We can use `assertNull` instead.CountryProviderTest.php:57These should be two separate tests (one for null and one for the empty string). -
Garvin Hicking marked it work in progress 07/14/25, 08:22
-
Garvin Hicking commented on patch set 1 07/14/25, 08:23
Reply
didnt flag as wip properly, thanks. Need to create the issue etc, caught this bug while working on sonething else -
Garvin Hicking uploaded patch set 2
V +107/14/25, 14:13 -
Garvin Hicking commented on patch set 2 07/14/25, 14:14
This change is ready for review.Reply
DoneCountryProviderTest.php:55ReplyDoneCountryProviderTest.php:57ReplyDone -
core-ci voted on patch set 2 V +1 07/14/25, 14:21 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/81692
-
Oliver Klee commented on patch set 2 CR +1 V +1 07/14/25, 14:36
13.4 is not affected? -
Garvin Hicking commented on patch set 2 07/14/25, 14:47
Reply
No, the "Country" object here is new with https://review.typo3.org/c/Packages/TYPO3.CMS/+/86177 and v14 only -
Sebastian Iffland commented on patch set 2 CR +1 V +1 07/14/25, 15:52
CountryProvider.php:1748just a thought, but why not do an `empty($isoCode)` check? This way early return would also apply on empty string. -
Oliver Klee commented on patch set 2 07/14/25, 16:30
CountryProvider.php:1748Reply`empty` behaves in mysterious ways, e.g., the integer `0`, the string `0` or the bool `false` are empty as well. Hence, more explicit checks like this assure that there are no unwanted false positives. -
Sebastian Iffland commented on patch set 2 07/14/25, 16:36
CountryProvider.php:1748ReplyYou're right, remember TCA trouble due to same in https://github.com/typo3/typo3/commit/8ca71b977c9. So one could check for `if ($isoCode === null || trim($isoCode) === '') {` to perform early exit in this case. -
Sebastian Iffland commented on patch set 2 07/14/25, 16:39
CountryProvider.php:1748ReplyAh, wrong noted. Of course I meant before the BUGFIX commit empty created issues with `0`s, which made this necessary 😅 -
Garvin Hicking commented on patch set 2 07/14/25, 16:42
CountryProvider.php:1748ReplyTheoretically we could have a "default" country if we do not bail early on empty strings, so I'd like to keep that option and only bail early on a NULL isoCode... -
Oliver Hader commented on patch set 2 07/15/25, 07:28
CountryProvider.php:1746Wouldn't it be better, to adjust the invocation to `getByIsoCode()`? Besides that, an additional comment what this method is doing would be great - in comparison to the other `getAlpha2IsoCode` and `getAlpha3IsoCode` methods. -
Garvin Hicking uploaded patch set 3
CR +1V +107/16/25, 06:30 -
Garvin Hicking uploaded patch set 4 07/16/25, 06:35
-
Garvin Hicking commented on patch set 4 07/16/25, 06:36
CountryProvider.php:1746ReplyI tried to phrase that. I'm not fully sure why Alpha2 and Alpha3 are both allowed here as a "lazy fallback", but I'm sure Benni had reasons in the initial commit. ;) -
core-ci voted on patch set 3 V -1 07/16/25, 06:38 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/81763
-
core-ci voted on patch set 4 V -1 07/16/25, 06:43 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/81764
-
Garvin Hicking uploaded patch set 5
V -107/16/25, 06:50 -
core-ci voted on patch set 5 V +1 07/16/25, 06:58 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/81765
-
Sebastian Iffland voted on patch set 5 CR +1 07/16/25, 07:03
-
Oliver Klee voted on patch set 5 CR +1 V +1 07/16/25, 11:05
-
Simon Schaufelberger voted on patch set 5 CR +1 V +1 07/17/25, 16:30
-
Oliver Hader voted on patch set 5 CR +1 V +1 07/22/25, 06:17
-
Garvin Hicking voted on patch set 5 CR +2 V +2 07/22/25, 06:21
-
Garvin Hicking merged patch set 6 07/22/25, 06:21