Status/Resolution/Reason: Closed/Withdrawn/NotABug
Reporter/Name(from Bugbase): Henry Ho / Henry Ho (Henry Ho)
Created: 07/26/2016
Components: Language
Versions: 11.0
Failure Type: Usability Issue
Found In Build/Fixed In Build: CF11_Final /
Priority/Frequency: Major / All users will encounter
Locale/System: English / Win All
Vote Count: 0
Problem Description:
invoke() should be able to invoke a local private method within the same cfc just like <cfinvoke>
Steps to Reproduce:
<cfcomponent>
<cffunction name="privateFunc" access="private">
<cfreturn "OK!">
</cffunction>
<cffunction name="init">
<cfinvoke method="privateFunc"/>
<cfset invoke(this, "privateFunc")>
</cffunction>
</cfcomponent>
Actual Result:
The method privateFunc was not found in component test.cfc.
Ensure that the method is defined, and that it is spelled correctly.
The error occurred in test.cfc: line 10
8 : <cfinvoke method="privateFunc"/>
9 :
10 : <cfset invoke(this, "privateFunc")>
Expected Result:
private function should be allowed to be invoked
Any Workarounds:
none.
I think invoke("privateFunc") should work for invoking local methods, private or not private.
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 4175845
External Customer Info:
External Company:
External Customer Name: Henry Ho
External Customer Email:
External Test Config: My Hardware and Environment details:
Attachments:
Comments: