Weird syntax error
| From: | Duncan Hill | Date: | Tue, 10 Jun 2003 12:59:26 +0000 |
| Subject: | Weird syntax error | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-9689@lists.php.net to get a copy of this message | ||
Greetings,
Been playing with Smarty, and liking what I see. However, I've now run into a
weird issue that is really annoying me.
---PHP 1---
$smarty = new Smarty();
$smarty->assign('on_overview', 'Y');
$smarty->display('menu.tpl');
---Template 1---
{if $on_overview eq "Y"}
<a class="menuMain"
href="overview.php">{$i18n_system_overview}</a>
{/if}
---Error---
Fatal error: Smarty: [in menu.tpl line 4]: syntax error: unidentified token
'\"Y\"' (Smarty_Compiler.class.php, line 1228) in
/usr/local/php4/lib/smarty/Smarty_Compiler.class.php on line 1824
---PHP 2---
$smarty = new Smarty();
$smarty->assign('profile_set', 'Y');
$smarty->display('header.tpl');
---Template 2---
{if $profile_set eq "Y"}
{$i18n_current_profile}: {$i18n_current_profile_name}
{/if}
---Error---
None. Nada. Zip. Template displays fine.
I've limited the templates down to just those lines, and the issue persists.
What on earth is biting me? Smarty 2.5.0, PHP 4.3.1.