You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Smarty has support for the ternary operator since 2009/2010. But it was never documented. Also, it requires the testing expression to be in parentheses. So this works now:
{($foo) ? $var1 : $var2}
But this will not:
{$foo ? $var1 : $var2}
There is no support for the shorthand ?: version.
Change the implementation to make the parentheses optional
Smarty has support for the ternary operator since 2009/2010. But it was never documented. Also, it requires the testing expression to be in parentheses. So this works now:
{($foo) ? $var1 : $var2}But this will not:
{$foo ? $var1 : $var2}There is no support for the shorthand
?:version.