Bug #8893
Negative numeric values are not correctly converted to FALSE
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
Associated revisions
[!!!][+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.