[BUGFIX] Ensure compared values are of same type
When strict type comparison was introduced to the OptionViewHelper in #90540, it was not properly ensured that the values to compare are of same type. The issue is fixed by always typecasting the selected value to string, before comparing it to the value in question, which will always be a string, according to its type hint. Resolves: #93801 Releases: master, 10.4 Change-Id: I3ea1d885a35e3223919facfe6d1825332914a7ed Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/68560 Tested-by:TYPO3com <noreply@typo3.com> Tested-by:
core-ci <typo3@b13.com> Tested-by:
Georg Ringer <georg.ringer@gmail.com> Tested-by:
Benni Mack <benni@typo3.org> Reviewed-by:
Oliver Klee <typo3-coding@oliverklee.de> Reviewed-by:
Jonas Eberle <flightvision@googlemail.com> Reviewed-by:
Georg Ringer <georg.ringer@gmail.com> Reviewed-by:
Benni Mack <benni@typo3.org>
Showing
- typo3/sysext/fluid/Classes/ViewHelpers/Form/Select/OptionViewHelper.php 3 additions, 3 deletions...luid/Classes/ViewHelpers/Form/Select/OptionViewHelper.php
- typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/Select/OptionViewHelperTest.php 11 additions, 2 deletions...sts/Unit/ViewHelpers/Form/Select/OptionViewHelperTest.php
Please register or sign in to comment