cphalcon
cphalcon copied to clipboard
Problem with switch and filters in php7
Hello,
In the new version (3.3) of Phalcon, the switch was brought in php7. My project is in the process of migrating from php5 to php7, so I have just encountered a problem between the switch and the default filter.

{{ myvar|default("abc") }}
Could you please provide the code to reproduce?
He provided, just use this code in volt.
Parts of volt file :
{% for c in columns %}
<th data-column-id="{{c['name']}}" data-type="{{c['type']}}" data-sortable="{{c['sortable']}}" data-visible={{ c['visible']|default('true') }}>{{c['label']}}</th>
{% endfor %}
I'll try to sort out as soon as I can (most likely after 3rd January)
Fixed in the 3.3.x branch. Feel free to open a new issue if the problem appears again. Thank you for contributing.