Status/Resolution/Reason: Closed/Withdrawn/AsDesigned
Reporter/Name(from Bugbase): James Mohler / James Mohler (James Mohler)
Created: 02/20/2016
Components: Language
Versions: 2016
Failure Type: Non Functioning
Found In Build/Fixed In Build: CF2016_Final /
Priority/Frequency: Critical / All users will encounter
Locale/System: ALL / Mac 10.11
Vote Count: 0
Problem Description:
Safe Navigation ?. cannot be used with if ( ) statement
Steps to Reproduce:
Assuming that request.bob usually does not exist:
<cfscript>
if(request?.bob) writeoutput("There is a Bob variable");
</cfscript>
crashes
Actual Result:
Crash. See image
Expected Result:
I am expecting the if to treat a non existent variable as false. This is similar to how BooleanFormat() function works
Any Workarounds:
Go back to using ColdFusion 11 style if isDefined() && != ""
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 4120071
External Customer Info:
External Company:
External Customer Name: James Mohler
External Customer Email:
External Test Config: My Hardware and Environment details:
Attachments:
- February 20, 2016 00:00:00: 1_Untitled.png
Comments: