Migration Solutions for ColdFusion Applications to ASP.NET
      
New Atlanta Product Forums Profile | Search | Login | RSS
New Topic Reply   Previous Page  Page: 1   Next Page

Thread: CFIF performing as CFset
Created on: 09/27/13 08:23 AM Replies: 1
801913967


Joined: 04/15/13
Posts: 3
CFIF performing as CFset
09/27/13 8:23 AM

Hi due to an error I opened up the whole site as an administrator.

Using like

<cfset x = 0>

<cfset profile = "User">

<cfif x = 1>
<cfset profile = "Admin">
</cfif>

Print <cfoutput>#profile#</cfoutput>

[Admin was printed]

The problem is that I didn't use the corect eq instead I used =, and this translates into <cfset x=1>

Is there a patch to cover this bug.
Link | Top | Bottom
Peter


Joined: 03/31/08
Posts: 22
RE: CFIF performing as CFset
01/13/16 5:00 AM

As no authority has answered I assume there is no patch but it is "by design" and probably consistent with ColdFusion. It indeed has caught me out a few times but a misuse of "=" has become one of the first things I go looking for during testing when the same logic path is followed when it shouldn't.
Link | Top | Bottom

New Post
Please login to post a response.


company media information terms of use privacy policy contact us
This page was dynamically built on the BlueDragon CFML Engine