Skip to main content
Christopher Bowyer
Participant
December 23, 2022
Answered

cfparam Cookie Issue

  • December 23, 2022
  • 1 reply
  • 372 views

Is this a bug?

 

Running the following produces an error no matter what 'type' attribute value is entered, even 'any'. However, it runs fine when the type attribute is omitted.

 

<cfparam name="cookie.factId" type="any" default="1">

 

 

 

 

    This topic has been closed for replies.
    Correct answer Christopher Bowyer

    Strange. I've just run again, trying type any and type integer, and both work fine. Perhaps a cache issue?

     

    I'm running ColdFusion 2021 Update 4. I tried to upgrade to 5 recently but uninstalled it as it created an issue. I can't remember exactly what it was, but I gave up after a couple of attempts.

     

    I appreciate your support. Thank you.

    1 reply

    BKBK
    Community Expert
    Community Expert
    December 24, 2022

    I do not expect that code to produce an error. In fact, when I run the following test code

     

    <cfparam name="cookie.factId" type="any" default="1">
    <cfdump var="#cookie#">

     

    the result is

     

    I am on ColdFusion 2021 Update 5.

     

    What is your ColdFusion version and update level? Could you share the stacktrace/error-message?

     

     

    Christopher Bowyer
    Christopher BowyerAuthorCorrect answer
    Participant
    December 24, 2022

    Strange. I've just run again, trying type any and type integer, and both work fine. Perhaps a cache issue?

     

    I'm running ColdFusion 2021 Update 4. I tried to upgrade to 5 recently but uninstalled it as it created an issue. I can't remember exactly what it was, but I gave up after a couple of attempts.

     

    I appreciate your support. Thank you.

    BKBK
    Community Expert
    Community Expert
    December 25, 2022

    Could you share the stacktrace/error-message?