Perhaps I miss something, but this behavior seems strange to me:
$number = 2 - 2;
echo $number;
displays 0 like it should be.
$number = 2 - 2;
$tmpl-setvar'number', $number;
displays nothing.
$number = 2 - 2;
$tmpl-setvar'number', $number;
works fine again.
It's working this way, but why echo and setvar work differently?
Regards,
Claus
---
Note:
First encountered in:
if $successes_a = $successes_b
$netto = $successes_a - $successes_b;
$winner = A;
else
$netto = $successes_b - $successes_a;
$winner = B;
$tmpl-setvar'netto', $netto; // $netto==0 would display nothing instead of 0
$tmpl-setvar'winner', $winner;