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

{if} statment problems on 3.1.24 #48

Closed
JercSi opened this issue Jun 2, 2015 · 1 comment
Closed

{if} statment problems on 3.1.24 #48

JercSi opened this issue Jun 2, 2015 · 1 comment

Comments

@JercSi
Copy link
Contributor

JercSi commented Jun 2, 2015

Example:

{if isset($abc.sub)
    and $abc.sub
    and isset($def)
    and $def and !isset($bla)}
{/if}

In 3.1.21 is template compiled without any problems

if (isset($_smarty_tpl->tpl_vars['abc']->value['sub'])&&$_smarty_tpl->tp...

In 3.1.24 looks like something breaks the compiling - && is missing:

if (isset($_smarty_tpl->tpl_vars['abc']->value['sub'])$_smarty_tpl->tpl_va....

Working examples on 3.1.21 and 3.1.24

{if isset($abc.sub) and $abc.sub and isset($def) and $def and !isset($bla)}{/if}

It also works if 'and' is replaced with &&

{if isset($abc.sub)
    && $abc.sub
    && isset($def)
    && $def and !isset($bla)}
{/if}
@uwetews
Copy link
Contributor

uwetews commented Jun 3, 2015

The lexer did not handle line breaks on the word logical operators like 'and' etc. it does work with the symbolic ones like '&&'.

The fix is already the the dev-master version.

We will soon release 3.1.25 as a maintenance release.

@uwetews uwetews closed this as completed Jun 3, 2015
think-mcunanan pushed a commit to think-mcunanan/smarty that referenced this issue Mar 22, 2023
…b-reservation-to-redirect-to-the-top-screen-of-the-new-web-reservation

Redmine-#5298:旧WEB予約 新WEB予約のTOP画面へリダイレクトさせたい
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