Re: [SMARTY-DEV] Smarty parser
| From: | boots | Date: | Thu, 15 Dec 2005 19:09:48 +0000 |
| Subject: | Re: [SMARTY-DEV] Smarty parser | ||
| References: | 1 | Groups: | php.smarty.dev |
| Request: | Send a blank email to php-smarty-dev+get-2819@lists.php.net to get a copy of this message | ||
--- "pobox@verysmall.org" <pobox@verysmall.org> wrote:
> If I make the following mistake -
>
> {foreach from=$foo item=$bar}
>
> (Note the '$' in front of 'bar'.)
>
> I get a php parser error on the next row after the last row of the
> parsed template (i.e. row 130 and the parsed template has only 129 rows).
>
> Should not Smarty look for such errors or am I missing something?
It does exactly that. It throws this error for your example code:
Fatal error: Smarty error: [in Page/Test.tpl line 1]: syntax error: 'foreach:
item' must be a variable name (literal string) (Smarty_Compiler.class.php, line
1158) in Smarty.class.php on line 1095
xo boots
> It is quite an idiotic mistake, but when one is under stress, some help
> from Smarty would be welcome.
>
> Smarty 2.6.10.
>
> Iv
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com