Re: [SMARTY] php_include, variable exists?
| From: | Matthew Wlazlo | Date: | Fri, 16 Jan 2004 13:20:33 +0000 |
| Subject: | Re: [SMARTY] php_include, variable exists? | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-10825@lists.php.net to get a copy of this message | ||
Hey,
> 2. How can I check, if a template variable exists?
> Using {if $name} I get a notice.
You can use the php function isset().
{if isset($name)}
I'm actually working on a problem like this too.
I'm using a PHP error handler via set_error_handler(). Debugging is turned off
in smarty yet I'm still getting notice messages. From what I can tell these are
supposed to be turned off in Smarty.class.php:1172 (version 2.6.0).
Can anyone take a guess as to why these might still be coming up? I'd like to
keep notices turned on in my own code to identify possible bugs...
Cheers,
Matt.