Math tokens undefined in 2.4.0 {if} blocks
| From: | Duke Ionescu | Date: | Mon, 03 Feb 2003 19:50:57 +0000 |
| Subject: | Math tokens undefined in 2.4.0 {if} blocks | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-7491@lists.php.net to get a copy of this message | ||
index.php:
<?php
require_once('Smarty.class.php');
require_once('Config_File.class.php');
$sm = new Smarty;
$sm->assign('one', 1);
$sm->assign('two', 1);
$sm->assign('three', 1);
$sm->display('index.tpl');
?>
index.tpl:
{if $one + $three > $two}yes{else}no{/if}
Result:
Fatal error: Smarty: [in index.tpl line 1]: syntax error: unidentified token
'+' (Smarty_Compiler.class.php, line 1202) in
/usr/local/lib/php/Smarty_Compiler.class.php on line 1818
This used to work in 2.3.1 and it doesn't make sense for it to go away. All
math tokens are gone.. why? No mention of this in the release notes.