tracker issue : CF-4121621

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

Safe navigation with param

| View in Tracker

Status/Resolution/Reason: Closed/Withdrawn/NotABug

Reporter/Name(from Bugbase): James Mohler / James Mohler (James Mohler)

Created: 02/25/2016

Components: Language

Versions: 2016

Failure Type: Crash

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 param


Steps to Reproduce:

Consider the case where a variable called Bootstrap exists, but Bootstrap profile does not

param attributes.profile			= Bootstrap?.profile;

This doesn't work either

param attributes.profile			= "#Bootstrap?.profile#";


Actual Result:

The required parameter ATTRIBUTES.PROFILE was not provided.

This page uses the cfparam tag to declare the parameter ATTRIBUTES.PROFILE as required for this template. The parameter is not available. Ensure that you have passed or initialized the parameter correctly. To set a default value for the parameter, use the default attribute of the cfparam tag. (Expression)


Expected Result:

attributes.profile should be set to blank

Any Workarounds:

	if(Bootstrap.keyExists("profile"))	{
		param attributes.profile			= Bootstrap.profile;
		}

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

Watson Bug ID:	4121621

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

Attachments:

Comments:

Again you're expectations are simply off here. If bootstrap.profile doesn't exist, then bootstrap?.profile evaluates to null. And *intrinsically* null will fail a param check. That's what param is for. ?. can be seen as a replacement for param, in a way, but you'd be needing to use it as attributes?.profile here, not with bootstrap?.profile I suggest you stop raising issues about ?. until you actually understand what it does.
Comment by External U.
4469 | February 25, 2016 03:36:17 AM GMT
This is an expected behavior and hence closing it as NotABug.
Comment by Suchika S.
4470 | February 25, 2016 04:35:07 AM GMT