Problems with '%' (modulo)

From: Date: Thu, 03 Feb 2005 16:23:58 +0000
Subject: Problems with '%' (modulo)
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-12225@lists.php.net to get a copy of this message
hi there, I recently uploaded a template to my server which worked fine on my machine (CVS version, PHP 4.3.8) but did not work on the server (smarty 2.6.6, PHP 4.3.10). The error message: Fatal error: Smarty error: [in add_main.tpl line 72]: syntax error: invalid attribute name: '%' (Smarty_Compiler.class.php, line 1510) in /usr/local/lib/mbant/smarty/libs/Smarty.class.php on line 1088 this is the faulty bit: {if $smarty.section.icon.last and ($smarty.section.icon.total % 4)} colspan="{$smarty.section.icon.total % 4}"{/if} the 2nd '%' is the one that produces the error (the first one doesn't!). I cleared all the templates, but that didn't make any difference. Doesn't seem to make any sense to me. thanks in advance, martin -- /* no comment */ Please use my public PGP key: http://www.mbant.de/mbant-gpg-key

« previous php.smarty.general (#12225) next »