Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smarty const is broken #302

Closed
machavity opened this issue Oct 10, 2016 · 1 comment
Closed

Smarty const is broken #302

machavity opened this issue Oct 10, 2016 · 1 comment

Comments

@machavity
Copy link

machavity commented Oct 10, 2016

Upgraded my dev environment to work on #301 and came across a new error in doing so

Here's the Smarty code

{if $smarty.const.SITE_ID == 1}
    Do stuff
{/if}

And the rendered output in Smarty cache (this works in -dev/32)

Smarty version 3.1.31-dev/33, created on 2016-10-10 12:15:40

$_smarty_tpl->_subTemplateRender('file:layout/".((string)@constant('SITE_ID'))."-index.tpl', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0, true);

With the error

Parse error: syntax error, unexpected 'SITE_ID' (T_STRING), expecting ',' or ')' in /path/to/cache.tpl.php on line 27

I am using PHP 7.0.11

uwetews added a commit that referenced this issue Oct 11, 2016
@uwetews
Copy link
Contributor

uwetews commented Oct 11, 2016

This is now fixed in the master branch

@uwetews uwetews closed this as completed Oct 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants