Bug #65689
closedType cast for BackendUtility::getLabelsFromItemsList()
100%
Description
Because of no strict comparison the mentioned method fails to get the correct value!
ExampleEXT:news
got the following TCA
'type' => array(
'exclude' => 0,
'label' => 'LLL:EXT:cms/locallang_tca.xlf:pages.doktype_formlabel',
'config' => array(
'type' => 'select',
'items' => array(
array($ll . 'tx_news_domain_model_news.type.I.0', 0),
array($ll . 'tx_news_domain_model_news.type.I.1', 1),
array($ll . 'tx_news_domain_model_news.type.I.2', 2),
),
'size' => 1,
'maxitems' => 1,
)
),
the value of the items is an integer > 0,1,2
if someone extends the extension, like https://github.com/peterkraume/news_exampleextension which adds another type like @blogText", the core compares
the string "blogtext" vs the integer "0" which is TRUE.
As a solution: use a typecast
Updated by Gerrit Code Review over 9 years ago
- Status changed from Accepted to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/37770
Updated by Gerrit Code Review over 9 years ago
Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/37781
Updated by Georg Ringer over 9 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 132b1f28eb61dbdb8b579112df36287816ec99de.
Updated by Riccardo De Contardi about 7 years ago
- Status changed from Resolved to Closed