For Programmers: Free Programming Magazines  


Home > Archive > PHP Smarty Templates > February 2005 > Problems with '%' (modulo)









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Problems with '%' (modulo)
Martin Braun

2005-02-03, 4:01 pm

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
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com