RE: [SMARTY] [error] PHP Notice: Undefined index:
| From: | Ryan Sarver | Date: | Thu, 20 Mar 2003 16:40:25 +0000 |
| Subject: | RE: [SMARTY] [error] PHP Notice: Undefined index: | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-8781@lists.php.net to get a copy of this message | ||
try:
{if $pic eq ""}
...
{/if}
-----Original Message-----
From: w.kutting@gmx.de [mailto:w.kutting@gmx.de]
Sent: Thursday, March 20, 2003 11:39 AM
To: smarty-general@lists.php.net
Subject: [SMARTY] [error] PHP Notice: Undefined index:
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
When i assign a value to $smarty->assign("pic",''); everything is
alright. But as am am filling this variable on request, i am not eager
to put empty values for every variable used in the template.
I isset inside smarty would be the best, but i don#t find anything like
that ?
--
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php