Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Delete cookie with $this->cookies->delete("cookie_name")

Hi, again from me :D.

I have one question related to cookies and deleting them. I trying to delete cookie with $this->cookies->delete('cookie_name') or $this->cookies->get('cookie_name') but this is impossible. I made it work by just changing cookie expiration date in the past. Yet why the methods do not work? I have seen in the documentation that these methods do not delete from the global $_COOKIE, then from where they delete it?



9.0k
Accepted
answer

If you're on Phalcon 4 it could be related to this bug: https://github.com/phalcon/cphalcon/issues/14667 We will release 4.0.1 today that should fix this.

This is great. I love Phalcon!

Thanks Ruud!