0
votes
<cfif ISDEFINED("CALLER.VARIABLES.STRFUNCNAME")>
  <cfparam name="strFuncName" default="#EVALUATE(CALLER.VARIABLES.STRFUNCNAME)#" />
<cfelse>
  <cfparam name="strFuncName" default="" />
</cfif>

This code is in one of our CustomTags and is throwing an error on the EVALUATE line. I'm not sure how that's even possible.

I can do this from the calling page to see that the variable is defined:

<cfset VARIABLES.strFuncName = "strFuncName#intModule#"> <!--- intModule = 1188 --->
#VARIABLES.strFuncName#: #EVALUATE(VARIABLES.strFuncName)# <!--- strFuncName1188: Main --->
<CF_CUSTOMTAG> <!--- Tell me Variable strFuncName1188 is undefined. --->
2

2 Answers

3
votes

Change your code to this:

<cfparam name="strFuncName" default="#EVALUATE('CALLER.VARIABLES.STRFUNCNAME')#" />
0
votes

Finally figured it out…

CALLER.VARIABLES.STRFUNCNAME was only returning "strFuncName####". So doing an evaluate on that was looking for the variable "strFuncName####" it in the current processing scope, not on the CALLER.

I changed the cfparam to the following and it began working:

<cfparam name="strFuncName" default="#EVALUATE("CALLER." & CALLER.VARIABLES.STRFUNCNAME)#" />