Re: [SMARTY] Bring back E_ALL!

From: Date: Mon, 15 Apr 2002 21:00:14 +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-3755@lists.php.net to get a copy of this message
Hello Gabor, Does that mean that this is ugly because this could make designers life more complex ? If this is the case, its ot a problem for me as.. I don't have a separate designer. In fact my behind the scene" question was : is isset() something not correct that could lead to problem.. Luc At 20:58 15/04/02 +0200, Gabor Hojtsy wrote:
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 (#3755) next »