For Programmers: Free Programming Magazines  


Home > Archive > PHP Smarty Templates > March 2004 > Re: [SMARTY] default modifier generates notice









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 Re: [SMARTY] default modifier generates notice
Messju Mohr

2004-03-19, 1:28 pm

On Tue, Mar 02, 2004 at 05:05:58PM +0200, David Förster wrote:
> Hello,
>
> when I use the default modifier for a simple variable which is not set
> the default value is printed but there's also a warning saying the
> variable is not set.
>
> Is there any way to supress that notice?


just as in php: lower the error-reporting.

> I had a look into the comiled templated but there is only a check if the
> variable is an array.
>
> - david

Messju Mohr

2004-03-19, 1:28 pm

On Tue, Mar 02, 2004 at 07:13:56PM +0100, messju mohr wrote:
> On Tue, Mar 02, 2004 at 05:05:58PM +0200, David Förster wrote:
>
> just as in php: lower the error-reporting.


I just see the notice is alread silenced with the @-operator. You seem
to run a custom error-handler. see
http://php.net/manual/en/function.set-error-handler.php :

"... - however you are still able to read the current value of
error_reporting and act appropriately. Of particular note is that this
value will be 0 if the statement that caused the error was prepended
by the @ error-control operator. "


>
> --
> Smarty General Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

Sponsored Links







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

Copyright 2008 codecomments.com