We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Wrong compilation of "is not empty"

When I test something like this

{{ if object.attribute is not empty }}

It compiles into:

<?php if ($destaque->fotos == !$empty) { ?>

I'm using Phalcon 1.1.0

You could use

{{ if object.attribute is defined }}

instead.



98.9k

or:

{% if not (object.attribute is empty) %}

Nice! I didn't see the "defined" in the documentation of version 1.1.0 Thanks folks!