Re: [SMARTY-GENERAL] Warning: Undefined Index:
| From: | Luc Saint-Elie | Date: | Thu, 04 Apr 2002 13:38:13 +0000 |
| Subject: | Re: [SMARTY-GENERAL] Warning: Undefined Index: | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-3482@lists.php.net to get a copy of this message | ||
Hello,
In case I missed an answer to this post I'd be interested by a re-post.
I'm in the same situation : development with E_ALL and a Notice error :
Notice: Undefined index: users_online in T:\EasyPHP\www\projet1\templates_c\117\1172603085\0.php on line 123
The template's code is :
{if $users_online}({$users_online} personnes en ligne) {/if}
The compiled template's line 123 is
<?php if ($this->_tpl_vars['users_online']): ?>(<?php echo $this->_tpl_vars['users_online']; ?>
personnes en ligne) <?php endif; ?>
Setup :
Windows 98 / Apache 1.3.24 / PHP 4.2.0RC1 / Smarty 2.0.1
Luc
At 17:28 29/03/02 -0800, Steve wrote:
I just turned on error reporting to E_ALL because of the discussion on the list. I'm writing to clarify that I understand the issue previously discussed. In my template I have the following: {if $smarty.get.id == $manufacturers[man]->id and $smarty.get.mode == "modify"} The warning reported is: Warning: Undefined index: id in /var/www/html/admin/templates_c/-14/-1424756358/0.php on line 115 Is it necessary to do a isset() call in the template on this to prevent the error? Or, is turning the error reporting down the only solution? Thanks, Steve