Checking for empty variable in PHPTAL condition
- by kodziek
In PHPTAL tal:condition can check is variable empty?
Something like that:
< tag tal:condition="var" >Some text< /tag >
but the value of variable is like that:
<?php
$variable = '';
$Tpl->var = $variable;
?>
And it's a problem 'cause PHPTAL that value '' interpreting like not empty value and condition return true.
How fix it in PHPTAL side?