Re: Smarty and Warnings
| From: | Monte Ohrt | Date: | Thu, 17 May 2001 20:46:49 +0000 |
| Subject: | Re: Smarty and Warnings | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-778@lists.php.net to get a copy of this message | ||
Holger Bahr wrote:
>
> Hi,
>
> i use
>
> <?php
> error_reporting(63);
> ...
> ..
> .
> ?>
>
> during the time i develop some stuff.
>
> The bad thing is, that smarty throws out many warnings about
> undefined variables then. Test driving somthing with error_reporting(63)
> or a debugger, is kinda hell because smarty compiles the templates by request
> now (wich "normally" is nice).
>
> In the older Versions i said "ok, one time all those warnings but
> after smarty filled up templates_c it´s quiet again).
>
> Is there a way to tell smarty "please compile _all_ templates now and
> not by request"
short answer: no.
You can't possibly know where all the templates are ahead of time, as
templates may come from separate physical sources, separate directories,
different branches with $smarty->display() calls, etc.
All the templates used to be in one directory. This paradigm has
changed.
You could change your error_reporiting level at the beginning of the
display() function, then set it back at the end of the function.