Re: [SMARTY-DEV] Smarty changes error_reporting() level
| From: | Jan Rosier | Date: | Mon, 13 Oct 2003 10:02:34 +0000 |
| Subject: | Re: [SMARTY-DEV] Smarty changes error_reporting() level | ||
| References: | 1 2 3 4 | Groups: | php.smarty.dev |
| Request: | Send a blank email to php-smarty-dev+get-1902@lists.php.net to get a copy of this message | ||
If you like to give it a try. Here is a patch for this.
Greetings,
Jan Rosier
messju mohr <messju@lammfellpuschen.de> wrote:
> 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);
>>>
107a108,122 > * This determines which errors / warnings are suppressed when a template is fetched. > * Examples: > * <ul> > * <li>E_WARNING suppress warnings</li> > * <li>E_NOTICE suppress notices</li> > * <li>FALSE don't suppress errors</li> > * </ul> > * @link http://www.php.net/manual/en/phpdevel-errors.php > * @link http://www.php.net/error_reporting > * @since v2.6.0 > * @var integer > */ > var $suppress_errors = E_NOTICE; > > /** 1171c1186,1190 < $_smarty_old_error_level = $this->debugging ? error_reporting() : error_reporting(error_reporting() & ~E_NOTICE); --- > if (!$this->suppress_errors OR $this->debugging) { > $_smarty_old_error_level = error_reporting(); > } else { > $_smarty_old_error_level = error_reporting(error_reporting() & ~$this->suppress_errors); > }
107a108,122 > * This determines which errors / warnings are suppressed when a template is fetched. > * Examples: > * <ul> > * <li>E_WARNING suppress warnings</li> > * <li>E_NOTICE suppress notices</li> > * <li>FALSE don't suppress errors</li> > * </ul> > * @link http://www.php.net/manual/en/phpdevel-errors.php > * @link http://www.php.net/error_reporting > * @since v2.6.0 > * @var integer > */ > var $suppress_errors = E_NOTICE; > > /** 1171c1186,1190 < $_smarty_old_error_level = $this->debugging ? error_reporting() : error_reporting(error_reporting() & ~E_NOTICE); --- > if (!$this->suppress_errors OR $this->debugging) { > $_smarty_old_error_level = error_reporting(); > } else { > $_smarty_old_error_level = error_reporting(error_reporting() & ~$this->suppress_errors); > }