Bug #3412

ViewHelperNode.php -> convertArgumentValue() -- wrong handling of integers and booleans

Added by Susanne Moog about 6 years ago. Updated almost 5 years ago.

Status:Resolved Start date:2009-05-22
Priority:Should have Due date:
Assigned To:Bastian Waidelich % Done:

100%

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

Description

If you enter in some fluid if condition a parameter that is a true boolean like TRUE it gets converted to FALSE by the convertArgumentValue(). Same happens if the value is an integer != 0, it's still evaluated to false. Attached patch fixes it for me.

viewNodeHelper_boolEval.patch Magnifier (477 Bytes) Susanne Moog, 2009-05-22 08:51


Related issues

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

Associated revisions

Revision 5874c37a
Added by Bastian Waidelich about 6 years ago

Fluid:
  • Fixed convertArgumentValue() for values of type boolean - numeric values & booleans were not converted correctly. Thanks to Susanne Moog for the patch. Resolves #3412
  • Fixed HTMLSpecialCharsPostProcessor: htmlspecialchars is only applied for values of type string
  • Removed obsolete ActionLinkViewHelper - please use link.action
  • Adjusted FormViewHelper, Link/ActionViewHelper and Uri/ActionViewHelper to the latest changes of FLOW3

History

#1 Updated by Susanne Moog about 6 years ago

Snippet to reproduce:

<f:if condition={params.next}>
next
</f:if>

with

params->next = TRUE;

#2 Updated by Bastian Waidelich about 6 years ago

  • Status changed from New to Accepted
  • Assigned To set to Bastian Waidelich

#3 Updated by Bastian Waidelich about 6 years ago

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

Applied in changeset r2345.

Also available in: Atom PDF