Project

General

Profile

Actions

Task #90540

closed

use strict type comparison for isValueSelected

Added by TYPO3 GmbH TYPO3com over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2020-02-26
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
Sprint Focus:

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

Actions

Also available in: Atom PDF