Why is a ColdFusion SESSION variable “undefined” after being referenced a few lines before?

醉酒当歌 提交于 2019-12-05 15:23:42
Sean Corfield

It's most likely a thread safety issue with something else in your code clearing out session scope or assigning NULL to SESSION.User.

I suggest that because you don't seem to have a local declaration for i in your loop, so that code is not thread safe - and so you may have similar errors elsewhere in your code.

I'd put this line "SESSION.User = CreateObject("component", "cfc.User");" into onSessionStart() then it will run when each users session is first initiated.

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