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() %}
Not a bug, is _is_ a reserved word. https://docs.phalconphp.com/en/latest/reference/volt.html#other-operators
@JCMais i know that is reserved. But could be override or ignore like that \is.
$is ?
@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
Even if "is" is a reserved word it should be ignored when called like a method. So a Bug to me
Resolved in https://github.com/phalcon/cphalcon/pull/14410