SV: [SMARTY] [error] PHP Notice: Undefined index:

From: Date: Fri, 21 Mar 2003 08:42:29 +0000
Subject: SV: [SMARTY] [error] PHP Notice: Undefined index:
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-8798@lists.php.net to get a copy of this message
> > On Thu, Mar 20, 2003 at 05:39:18PM +0100, w.kutting@gmx.de wrote: > > > Hi, inside my templatefile is a passage > > > {if $pic} > > > {$pic} > > > {/if} > > > > > > When i call the template with Smarty 2.5.0 RC1 > > > i get the error > > > > > > [error] PHP Notice: Undefined index: pic in ..... > > > The error only shows when i am not assigning a value to smarty Actually if debugging is off you don't need to test with: {if $pic} {$pic} {/if} just write {$pic} and everything is fine, both when $pic is assigned and when it's not. If debugging is on however, and you want to avoid a warning, you have to test with {if isset($pic)} {$pic} {/if} Paolo

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