Re: [SMARTY] |default=''
| From: | Pupeno | Date: | Tue, 11 Jun 2002 19:44:30 +0000 |
| Subject: | Re: [SMARTY] |default='' | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-4787@lists.php.net to get a copy of this message | ||
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Tuesday 11 June 2002 15:36, Pupeno wrote:
> I would like that when the default parameter is passed, that the variable
> is not used, so no error is generated, can this be posible ? I could code
> it, but I didn't check if this is posible in the way smarty works.
> Thank you.
Checking how to do it, instead of outputing
$this->_run_mod_handler('default', true, $this->_tpl_vars['email'],
'username@host.org')
we would have to output:
$this->_run_mod_handler('default', true, isset($this->_tpl_vars['email'])
?
$this->_tpl_vars['email'] : '', 'username@host.org')
is that ok ?
- --
Pupeno: pupeno@pupeno.com
http://www.pupeno.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
iD8DBQE9BlMgLr8z5XzmSDQRAinEAJ97lD2vHUzkhQN7DEOE9GyQ92losQCgg0ti
p/wjOlnGfh19TBvZcsZ8ofA=
=NwMR
-----END PGP SIGNATURE-----