Re: [SMARTY] [error] PHP Notice: Undefined index:
| From: | messju mohr | Date: | Thu, 20 Mar 2003 16:42:05 +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-8782@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
>
> 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.
the notice it only issued when you have turned debugging on. you have
to set your error_reporting to a lower value if you don't want to see
these notices. we won't remove them, they can be handy for debugging
(finding typos in variable-names for example).
greetings
messju
> I isset inside smarty would be the best, but i don#t find anything like
> that ?