Title:
[elvis] [peter]: elvis operator returns second operand in some cases even if the first operand is not null
| View in TrackerStatus/Resolution/Reason: Closed/Fixed/Fixed
Reporter/Name(from Bugbase): / ext-user (Suchika Singh)
Created: 03/13/2015
Components: Language
Versions: 11.0
Failure Type:
Found In Build/Fixed In Build: CF 11 Final / 2016.0.0.298074
Priority/Frequency: Major / Some users will encounter
Locale/System: English / Win XP All
Vote Count: 12
Problem:elvis operator returns second operand in some cases even if the first operand is not null
Method:Run the following code:
<cfset a={name="suchi",age="23"}>
<cfset b="name">
<cfoutput>#a[b]?:'n/a'#</cfoutput>
Result:n/a
Expected:suchi
Workaround:
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3952818
External Customer Info:
External Company:
External Customer Name:
External Customer Email:
Attachments:
Comments: