Project

General

Profile

Actions

Bug #72235

closed

Checked attribute not workling in Fluids' CheckboxViewHelper for non property values

Added by Thomas Schlumberger over 8 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Fluid
Start date:
2015-12-15
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

In case one wants to use the "checked" attribute of fluids CheckboxViewHelper via a condition or just by setting it to "true" it does not work.

Example:

<f:form.checkbox name="data[mykey]" value="1" checked="{data.key} 1" />

This is caused by a wrong check in the CheckboxViewHelper on line 112-114 as there's always a string passed to the viewhelper

if ($checked = true) {
$this->tag->addAttribute('checked', 'checked');
}

To solve this problem a typecast on "$checked" needs to be made.

if ((boolean)$checked === true) {
$this->tag->addAttribute('checked', 'checked');
}

Actions #1

Updated by Mathias Brodala over 8 years ago

Maybe related to #67225 which was fixed recently?

Actions #2

Updated by Gerrit Code Review over 8 years ago

  • Status changed from New 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 https://review.typo3.org/45289

Actions #3

Updated by Mathias Schreiber over 8 years ago

  • Status changed from Under Review to Closed

abandoned due to user request

Actions

Also available in: Atom PDF