RE: [SMARTY] Bring back E_ALL!
| From: | Alan McFarlane | Date: | Tue, 16 Apr 2002 19:25:21 +0000 |
| Subject: | RE: [SMARTY] Bring back E_ALL! | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-3778@lists.php.net to get a copy of this message | ||
Since there seems to be a lot of people wanting E_ALL turned on, and a lot
turned off, is it possible to create a simple plugin of the form:
{smarty_errors show=false}
{smarty_errors show=true}
If the default were false, this would be more in keeping with standard HTML
(since it doesn't display any errors).
This would mean that template designers can check their templates without
having to ask the back-end coders to modify their work.
--
Alan McFarlane
-----Original Message-----
From: Monte Ohrt [mailto:monte@ispi.net]
Sent: 15 April 2002 20:17
To: Luc Saint-Elie
Cc: Smarty
Subject: Re: [SMARTY] Bring back E_ALL!
template designers shouldn't need to be making accomodations for whether
or not a variable is set, they may not even know what that means. When a
variable is printed {$var}, it either prints a value or not. isset() is
only adding an overhead that the engine should be taking care of, not
the template designer.
Monte
Luc Saint-Elie wrote:
> At 20:08 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.
>
>
> Hello,
>
> 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)
>
> Luc
>
>
--
Monte Ohrt <monte@ispi.net>
Director of Technology, ispi Inc.
--
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php