Re: [SMARTY-DEV] Smarty parser
| From: | messju mohr | Date: | Mon, 19 Dec 2005 09:31:56 +0000 |
| Subject: | Re: [SMARTY-DEV] Smarty parser | ||
| References: | 1 2 | Groups: | php.smarty.dev |
| Request: | Send a blank email to php-smarty-dev+get-2825@lists.php.net to get a copy of this message | ||
On Mon, Dec 19, 2005 at 10:23:49AM +0100, pobox@verysmall.org wrote:
> boots wrote:
> >--- "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
>
> How do you get these errors? I have never seen a 'Smarty error' in my
> life, though I tried to tweak the error reporting settings.
- ini_set('error_reporting', E_ALL)
- ini_set('display_errors', true)
- optional: unregister a custom error-handler
> Thanks,
> Iv