Bug #9434

f:if condition does not treat integers right

Added by Thomas Hempel over 11 years ago. Updated over 11 years ago.

Status:
Resolved
Priority:
Should have
Category:
ViewHelpers
Target version:
-
Start date:
2010-08-24
Due date:
% Done:

100%

Estimated time:
Has patch:

Description

if you compare a discrete value with a negativ number it will always return true.

Example:

In the controller:

$this->view->assign('value', -1);

In the Fluid template:

{value}
<f:if condition="{value} > -1">
    <f:then>
        is greater than -1
    </f:then>
    <f:else>
        is smaller or even -1
    </f:else>
</f:if>

The result is:

-1 is greater than -1 

Expected result:

-1 is smaller or even -1

#1

Updated by Sebastian Kurfuerst over 11 years ago

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

Also available in: Atom PDF