Subject: | use of filter inflect(number=>[something equalling 0]) is broken |
If you have a variable with some number in it which can sometimes be 0,
this module can exhibit very strange caching behaviour.
e.g.:
[% FILTER inflect(number => ponies) %]NO(ponies)[% END %]
If you render the template once with ponies = 4, it shows the right
thing. But if you render it again with ponies = 0, you'll see something
else (normally 4).
The problem is in tt_inflect:
Lingua::EN::Inflect::NUM($number) if $number;
Which should probably be:
Lingua::EN::Inflect::NUM($number) if defined $number;