Issue Task Closed

#90540use strict type comparison for isValueSelected

TYPO3 GmbH TYPO3com 02/26/20, 11:20 updated 04/21/20, 12:16

Description

\TYPO3\CMS\Fluid\ViewHelpers\Form\SelectViewHelper::isSelected
uses a strict type comparison but the OptionViewHelper does not.

This resulted in funny results when the values were convertable to int like this:
var_dump(in_array(1, [‘1-2’])); // prints bool(true)

The value is now converted to a string, just like in the SelectViewHelper,
and then strictly compared.

This issue was automatically created from https://github.com/TYPO3/TYPO3.CMS/pull/234

Reviews 1