tracker issue : CF-3758421

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

Error in calling arrayset generates incorrect error message

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): A. Bakia / A. Bakia (A. Bakia)

Created: 05/10/2014

Components: Language

Versions: 11.0

Failure Type: Cosmetic Issue

Found In Build/Fixed In Build: CF11_Final /

Priority/Frequency: Normal / All users will encounter

Locale/System: English / Windows 7 64-bit

Vote Count: 0

Listed in the version 2016.0.0.297996 Issues Fixed doc
Verification notes: verified_fixed on August 25, 2019 using build 2016.0.01.298513
Problem Description: If you pass 0 as the second and third arguments of arraySet(), you will get an incorrect error message.

Steps to Reproduce: Run a CFM file consisting of the following 2 lines:
<cfset testarray = arraynew(1)>
<cfset temp = arrayset(testarray, 0, 0, "")> 

Actual Result: The error message reads 
"0 is not greater than zero or less than or equal to 0."

Expected Result: The error message should read 
"0 is not greater than zero and less than or equal to 0."

Any Workarounds: Not applicable.

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

Watson Bug ID:	3758421

External Customer Info:
External Company:  
External Customer Name: BKBK
External Customer Email:  
External Test Config: My Hardware and Environment details:



I think it can be improved a helluva lot better than that even. The rules are: * the first value must be an integer greater than zero * and less than or equal to the second value (also an integer) So it could just say that. As demonstrated here, just mentioning the values and not which argument they relate to makes the error message somewhat opaque. -- Adam
Comment by External U.
12201 | May 11, 2014 01:57:20 AM GMT
Can you pls detail what the fix is?
Comment by External U.
12202 | June 22, 2015 06:50:01 AM GMT
Hi Adobe, I've verified this is fixed in CF2016 Update 1 (build 2016.0.01.298513). For the code in the description, the error message is now "Start index 0 should be greater than zero AND less than or equal to end index 0." Thanks!, -Aaron
Comment by Aaron N.
31204 | August 25, 2019 08:02:43 AM GMT