Skip to main content
Christopher Bowyer
Participant
Dec 23, 2022 4:25 AM UTC
Answered

cfparam Cookie Issue

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 is closed to new replies. Start a new post to keep the conversation going.
    Christopher Bowyer
    Christopher BowyerCorrect answer
    Participant
    Dec 24, 2022 4:25 PM UTC

    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.

    3 replies

    BKBK
    Community Expert
    Community Expert
    Dec 24, 2022 2:44 PM UTC

    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?

     

     

    Translate
    Christopher Bowyer
    Christopher BowyerAuthorCorrect answer
    Participant
    Dec 24, 2022 4:25 PM UTC

    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.

    Translate
    BKBK
    Community Expert
    Community Expert
    Dec 25, 2022 8:57 AM UTC

    Could you share the stacktrace/error-message?

    Translate