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

Syntax error, unexpected token IS in Volt #11683

Closed
afbora opened this issue Apr 17, 2016 · 6 comments
Closed

Syntax error, unexpected token IS in Volt #11683

afbora opened this issue Apr 17, 2016 · 6 comments
Labels
bug A bug report status: low Low

Comments

@afbora
Copy link

afbora commented Apr 17, 2016

When i use a is() function in Volt, like that:

{% if mobileDetect.is('Chrome') %} {% endif %}

I guess, is word conflicting with Volt and i get following error:

Syntax error, unexpected token IS in themes/default/views/index/index.volt on line 78

Than tried isMobile function that is word contains, but this is working, no errors:

{% if mobileDetect.isMobile() %}
@JCMais
Copy link

JCMais commented Apr 25, 2016

Not a bug, is is a reserved word. https://docs.phalconphp.com/en/latest/reference/volt.html#other-operators

@afbora
Copy link
Author

afbora commented Apr 25, 2016

@JCMais i know that is reserved. But could be override or ignore like that \is.

@sergeyklay
Copy link
Contributor

$is ?

@afbora
Copy link
Author

afbora commented Apr 25, 2016

@sergeyklay I tried like your said as following:

{% if !mobileDetect.$is('Chrome') %}

Getting that error:

Scanning error before 'is('Chrome') %} ...' in themes/default/views/index/index.volt on line 78

@makerlabs
Copy link
Contributor

Even if "is" is a reserved word it should be ignored when called like a method. So a Bug to me

@stale stale bot added the stale Stale issue - automatically closed label Apr 16, 2018
@sergeyklay sergeyklay reopened this Aug 6, 2019
@stale stale bot removed the stale Stale issue - automatically closed label Aug 6, 2019
@ruudboon ruudboon added the 4.0 label Sep 19, 2019
@phalcon phalcon deleted a comment from stale bot Sep 24, 2019
@niden
Copy link
Member

niden commented Sep 24, 2019

Resolved in #14410

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug report status: low Low
Projects
None yet
Development

No branches or pull requests

6 participants