开发者

Coldfusion: conflicting cfdump statements

I have a query l.q. l is var scoped:

var l = {};
开发者_开发百科

If I dump l:

writeDump(var:l, abort:true);

I get

Coldfusion: conflicting cfdump statements

You can see that q (l.q) shows [undefined struct element]. However if I do:

writeDump(var:isQuery(l.q), abort:true);

I get yes as the output? Dumping l.q.recordCount returns 1.

If I dump l.q I get an error: Error Type java.lang.ArrayIndexOutOfBoundsException : [N/A].

This is causing me quite a headache as on my website I get variables randomly disappearing like this all the time.

Any ideas of what could be going on here? CF9.0.1 Ent running on Windows Server 2005.


It looks like whatever is populating your l.q variable is not working correctly. How is l.q being populated?

If you're using l = {} as a "local" scope replacement - don't ColdFusion 9 already has a local scope inside of functions and you can dump it.


Are these dumps in the same place? Remember that if you execute a query that does not return anything (such as an update or delete) but use the name parameter, that variable will be set to undefined. It sounds like this could be happening here.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜