[BUGFIX] Ensure "0" is treated as proper fallback in site language 79/60879/2
authorBenni Mack <benni@typo3.org>
Wed, 5 Jun 2019 07:32:51 +0000 (09:32 +0200)
committerAndreas Fernandez <a.fernandez@scripting-base.de>
Fri, 7 Jun 2019 09:00:26 +0000 (11:00 +0200)
commit7681e206dc9f0445538cebf50b43d29082f8053b
treed67b3c37f1f47649be76b158a62c23c4d58f2e31
parentd9308aeaae93fc4ed59faf1b076db121e9923a87
[BUGFIX] Ensure "0" is treated as proper fallback in site language

Due to incomplete handling of "0" and casting, the fallback
is always "0" which is wrong.

The patch fixes the behavior and adds tests to all use-cases
mentioned in the ticket.

Resolves: #88490
Releases: master, 9.5
Change-Id: Ie685b96a94213104729261daa0e3be6e8ef29c35
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/60879
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Daniel Goerz <daniel.goerz@posteo.de>
Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Daniel Goerz <daniel.goerz@posteo.de>
Reviewed-by: Tobi Kretschmann <tobi@tobishome.de>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
typo3/sysext/core/Classes/Site/Entity/SiteLanguage.php
typo3/sysext/core/Tests/Unit/Site/Entity/SiteLanguageTest.php