Re: [SMARTY-DEV] Smarty changes error_reporting() level
| From: | messju mohr | Date: | Sat, 11 Oct 2003 09:43:40 +0000 |
| Subject: | Re: [SMARTY-DEV] Smarty changes error_reporting() level | ||
| References: | 1 | Groups: | php.smarty.dev |
| Request: | Send a blank email to php-smarty-dev+get-1894@lists.php.net to get a copy of this message | ||
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