Re: [SMARTY-DEV] Smarty changes error_reporting() level

From: Date: Sat, 11 Oct 2003 14:22:48 +0000
Subject: Re: [SMARTY-DEV] Smarty changes error_reporting() level
References: 1 2 3  Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-1897@lists.php.net to get a copy of this message
an object property IMHO. everything in Smarty is configured via object properties except of the very special SMARTY_DIR. although it's unlikely that somebody wants to change the value between two calls to display(), it's not that special. to me it's more something like Smarty::use_sub_dirs than like something SMARTY_DIR. On Sat, Oct 11, 2003 at 08:04:59AM -0500, Monte Ohrt wrote: > Should it be a class property or a define? > > messju mohr wrote: > > >i agree, this should be configurable. > > > >maybe simply by: > > > >var $supress_errors = E_USER_NOTICE > > > >and in fetch() > > > >$_smarty_old_error_level = $this->debugging ? error_reporting() : > >error_reporting(error_reporting() & ~E_USER_NOTICE); > > > >changes to > > > >$_smarty_old_error_level = $this->debugging ? error_reporting() : > >error_reporting(error_reporting() & ~$this->suppress_errors); > > > > > >maybe anybody here has a better name than "suppress_errors". > > > >greetings > >messju > > > > > >On Tue, Oct 07, 2003 at 11:49:15PM -0700, Bharat Mediratta wrote: > > > > > >>I use Smarty as the templating library for a much larger application, > >>as I'm sure many of you do. It works wonderfully in that capacity. > >>However, I noticed that Smarty turns off E_NOTICE if it is not > >>running in debug mode. > >> > >>In my application, I want to have total control over the warnings and > >>notices that are generated so that I can find and fix every occurrence. > >>It not always beneficial for me to run Smarty in debug mode, but if > >>I *don't* do run it in debug mode, then Smarty hides valuable information > >>from me. So now, every time I update I have to patch Smarty undo this > >>behaviour. > >> > >>I recognize that by now people have probably built apps that require > >>E_NOTICE to be disabled in order to function properly, so I guess it's > >>not an option to simply undo this behaviour. However, I would love it > >>if we could make this optional. If I submit a patch to make it optional, > >>(perhaps by setting a Smarty global variable) would it be accepted? > >> > >>thanks, > >>-Bharat > >> > >>-- > >>Smarty Development Mailing List (http://smarty.php.net/) > >>To unsubscribe, visit: http://www.php.net/unsub.php > >> > >> > > > > > > > > -- > Smarty Development Mailing List (http://smarty.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.smarty.dev (#1897) next »