Re: [SMARTY] Bring back E_ALL!

From: Date: Mon, 15 Apr 2002 18:58:53 +0000
Subject: Re: [SMARTY] Bring back E_ALL!
References: 1 2  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-3745@lists.php.net to get a copy of this message
> > > To suppress warnings, I use : > > > > > > {if isset($var)} > > > {$var} > > > {/if} > > > >That's ugly, brrr... Set error_reporting(E_ALL ^ E_NOTICE) in a > >subclass of Smarty. That's much more convinient. > > I don't understand why it's "ugly" , or more exactly why hiding an error is > less ugly than suppressing it ? > > (this is not a critic this is a real question) Because it is not hiding an error. It is not an error. It is expected behaviour, as template engines take advantage of variables being empty of not declared since ages... This is not critical for a template engine, though it can be critical for a PHP program... What you would like to propose, is too much programming in templates. Keep in mind, that Smarty [and generaly any template format] is primarily for *designers*. Look at the docs headers, smarty for programmers and smarty for designers... Goba

« previous php.smarty.general (#3745) next »