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

Phalcon 2 Flash/Session/has()

Hi, in phalcon 1.3 I can easily check if flashSession has any messages.

In volt I would do {% if flash.has('error')%}

I have just installed phalcon 2, and I get an error that has() method does not exist? Is there anything else that I can use instead of has method? Or this is something that is not done yet?

Looking through the zephir code for flash it seems there is no such method (has) or any method that checks wether there is a message.

Could have been overlooked or is awaiting implementation. If you have a solution you can submit a PR otherwise we have to wait for @phalcon.



98.9k

This is awaiting implementation, however it anyone wants to contribute it would be great