tracker issue : CF-3852305

select a category, or use search below
(searches all categories and all time range)
Title:

[ANeff] Bug for: member function errors say "The function accepts 1 parameters."

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Aaron Neff / Aaron Neff (Aaron Neff)

Created: 11/15/2014

Components: Language

Versions: 11.0

Failure Type: Cosmetic Issue

Found In Build/Fixed In Build: CF11_Final / CF11 Update5

Priority/Frequency: Minor / Some users will encounter

Locale/System: English / Win All

Vote Count: 0

Listed in the version 11.0.05.293506 Issues Fixed doc
If a member function accepts only 1 parameter, and 2+ parameters are passed-in, then:
- Actual exception message: "The function accepts 1 parameters." (plural)
- Expected exception message: "The function accepts 1 parameter." (singular)

Some repro examples:

<cfscript>
 myStruct = {1="b"};
 myStruct.each(function(){}, 2);//"The function accepts 1 parameters." (should be "parameter")
 
 myVar = "b";
 writeOutput(myVar.left(1, 2));//"The function accepts 1 parameters." (should be "parameter")
 
 myStruct = {1="b"};
 writeOutput(myStruct.find(1, 2));//"The function accepts 1 parameters." (should be "parameter")
</cfscript>

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3852305

External Customer Info:
External Company:  
External Customer Name: itisdesign
External Customer Email:

Attachments:

Comments:

The fix for this bug is available in the pre-release build of ColdFusion 11 Update 5
Comment by CFwatson U.
10076 | February 20, 2015 09:27:01 AM GMT
Verified this is fixed in CF11 Update 5 (build 11,0,05,293506). Thanks!, -Aaron
Comment by External U.
10077 | November 21, 2015 09:28:21 PM GMT
The error message is now "The function accepts 1 parameter(s)." which is a good compromise. Thanks!
Comment by External U.
10078 | November 21, 2015 09:29:14 PM GMT