Re: [SMARTY] php_include, variable exists?

From: Date: Fri, 16 Jan 2004 13:53:09 +0000
Subject: Re: [SMARTY] php_include, variable exists?
References: 1 2  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-10826@lists.php.net to get a copy of this message
On Sat, Jan 17, 2004 at 12:20:33AM +1100, Matthew Wlazlo wrote: > 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? it's because all errors and notices are passed to your error-handler regardless of the error_reporting-settings and regardless if you used the @-operator to suppress errors. that's documented behaviour, see: http://php.net/manual/en/function.set-error-handler.php > I'd like to > keep notices turned on in my own code to identify possible bugs... > > Cheers, > Matt.

« previous php.smarty.general (#10826) next »