Re: [SMARTY-DEV] Re: 'default'-modifier causes a php-notice
| From: | Nagger | Date: | Thu, 20 Mar 2003 00:49:12 +0000 |
| Subject: | Re: [SMARTY-DEV] Re: 'default'-modifier causes a php-notice | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 | Groups: | php.smarty.dev |
| Request: | Send a blank email to php-smarty-dev+get-992@lists.php.net to get a copy of this message | ||
thanks for the notice-free default modifier...
but there is a small thing left:
please change line 1643 from smarty_compiler.class
from
if($_modifier_args[0]{0} == '$') {
to
if(isset($_modifier_args[0])&& $_modifier_args[0]{0} == '$') {
now one can use "default" without a parameter (just to suppress notices for
other modifier: {$foo|default|anothermodifier})
bye...
Nagger
----- Original Message -----
From: "Monte Ohrt" <monte@ispi.net>
To: "Tom Sommer" <webmaster@tsn.dk>
Cc: "Smarty Dev" <smarty-dev@lists.php.net>
Sent: Saturday, March 15, 2003 9:48 PM
Subject: Re: [SMARTY-DEV] Re: 'default'-modifier causes a php-notice
> OK, CVS updated. only default modifier gets supressed, special case.
>
> example:
>
> <?php echo $this->_run_mod_handler('default', true,
> $this->_tpl_vars['lalalla'], $this->_tpl_vars['blahblah']); ?>
>
> is now:
>
> <?php echo $this->_run_mod_handler('default', true,
> @$this->_tpl_vars['lalalla'], @$this->_tpl_vars['blahblah']); ?>
>
>
>
> Monte
>
> On Sat, 2003-03-15 at 14:24, Tom Sommer wrote:
> > On Sat, 15 Mar 2003 21:23:04 +0100, Messju Mohr wrote:
> >
> > > for me: make a call to the default-modifier silent, but no other uses
> > > of undefined vars. other notices are useful in development and can be
> > > suppressed easily with error_reporting() or ini_set().
> >
> > setting debug to false will also do this.... killing all notices...
> >
> > In other words +1
> >
> > --
> > Tom Sommer, denmark
> > www.tsn.dk - www.dreamcoder.dk
> --
> Monte Ohrt <monte@ispi.net>
>
>
> --
> Smarty Development Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>