Status/Resolution/Reason: Closed/Withdrawn/NotABug
Reporter/Name(from Bugbase): Bradley Wood / Bradley Wood ()
Created: 09/11/2017
Components: Language
Versions: 2016
Failure Type: Data Loss
Found In Build/Fixed In Build: 2016 / NA
Priority/Frequency: Normal /
Locale/System: / Platforms All
Vote Count: 1
Problem Description:
It is imperative for frameworks such as MockBox to be able to tell via the metadata of a UDF if that UDF had output set to "true" so it can correctly mock methods. When you call getMetaData() on a UDF, ColdFusion does not return an "output" key in the metadata unless it was explicitly defined in the code. This is bad since tag UDFs default to output=true and script UDFs default to output=false. There's no way to tell from the metadata if a particular UDF was defined in tags or script so there's no way to know what the correct default output value is. getMetaData needs to correctly return the proper default output key in all cases based on how that function will behave when called without needing to know how it was defined. This is currently causing issues with the Mockbox framework when it tries to mock a tag-based UDF that needs to return output.
Steps to Reproduce:
<cffunction name="tagUDF"></cffunction>
<cfscript>
function scriptUDF() {}
writedump( getMetaData( tagUDF ) );
writedump( getMetaData( scriptUDF ) );
</cfscript>
Actual Result:
No output key exists in the metadata.
Expected Result:
The metadata needs to correctly represent which function will allow output.
Any Workarounds:
None
Attachments:
Comments: