Bug #8893

Negative numeric values are not correctly converted to FALSE

Added by Bastian Waidelich about 5 years ago. Updated almost 5 years ago.

Status:Resolved Start date:2010-07-15
Priority:Must have Due date:
Assigned To:Bastian Waidelich % Done:

100%

Category:Core
Target version:-
Has patch: Affected Flow version:

Description

<f:if condition="-1">this should not be rendered</f:if>

actually renders the content, cause ViewHelperNode::convertToBoolean() does not correclty determine the type as /numeric/.

Solution: move the is_numeric() check above the is_string() check.


Related issues

related to TYPO3.Fluid - Feature #3595: Convert integer types to boolean for if viewhelper Closed 2009-06-06

Associated revisions

Revision 8cb5a00c
Added by Bastian Waidelich about 5 years ago

[!!!][+TASK] Fluid (ViewHelpers): The value argument is required again in form.checkbox and form.radio ViewHelpers. This is a breaking change, as the value argument has not been mandatory for a while. But it probably won't break existing templates as omitting the value makes no sense at all. Relates to #8852
[+FEATURE] Fluid (Core): implemented overrideArgument() method in AbstractViewHelper to be able to override previously registered arguments in subclasses. This resolves #8852
[+BUGFIX] Fluid (Core): Negative numeric values are properly converted to FALSE when used in boolean ViewHelper arguments. This resolves #8893

History

#1 Updated by Bastian Waidelich about 5 years ago

  • Subject changed from Negative numeric values are not correctly converted to booleans to Negative numeric values are not correctly converted to FALSE

#2 Updated by Bastian Waidelich about 5 years ago

  • Status changed from Accepted to Resolved
  • % Done changed from 0 to 100

Applied in changeset r4864.

Also available in: Atom PDF