Just a quick warning about the CHF I just blogged about. It makes a small change to the LOCAL scope that can impact your code. It definitely breaks MXUnit's test runner. The change involves code that sets LOCAL variable. Imagine the following UDF:
<cfscript>
function foo() {
var local = "";
local.x = 1;
return x;
}
</cfscript>
<cfoutput>#foo()#</cfoutput>
Notice how I set local to a string, and then treat is a structure later. While that may be a bit sloppy, it works fine until you apply the CHF. Once you do, you get:
LOCAL is explicit scope in ColdFusion 9.You can only assign LOCAL to a struct. You cannot assign LOCAL to java.lang.String This is easy enough to fix, and easy to fix within MXUnit. Just find runner/HtmlRunner.cfc and delete line 13, which should be:
<cfset var local = "">
Archived Comments
Thanks for letting us know Ray! It should be fixed in the trunk and will be part of the next release.
The better fix might be to change the line to <cfset var local = structNew() /> for backwards compatibility.
No, everyone uses CF9. ;)