CakePHP Delete Cookie Issue

隐身守侯 提交于 2019-12-05 17:59:27

Looking through the source, it looks like this is either a bug or intended behavior.

The CookieComponent class has an internal __values array that it uses to keep track of cookie information. If you call delete('User.email'), it will remove the 'User' index from the __values array, including all data under the index.

However, it will only unset the cookie named 'User'. Next time Cake fires up, it will see that a cookie named 'User.email' still exists and load it back into the __values array.

Assuming it's not intended behavior, I wrote a fix and I'll go ahead and submit it to the Cake team.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!