In the particular example I gave, the cf4 parser should choke on cfdump,
even though it will never be called, it still causes the error.
-Ray
Actually, I stand corrected. It's not an issue even with Strict
Validation turned off.
If I do:
<CFIF 0>
<CFRAY>
</CFIF>
I get the error anyway, even though CFRAY is never called.
Either way, the point is, if you want to do:
<CFIF CF5>
.
<CFELSE>
.
</CFIF>
Your CF5 block has to be in a file.
This works, even if test2.cfm uses <CFRAY>
<CFIF 0>
<CFINCLUDE TEMPLATE="test2.cfm">
</CFIF>
> Ray,
> Out of curiosity what is it about this code in particular
> that makes it throw an error if you have strict attribute
> validation turned on? Is that on CF4.x or CF5
>
> Thanks
>
> Kola Oyedeji
> Web developer
> Macromedia Certified Advanced ColdFusion 5 Developer
> http://www.Alexandermark.com (+44)020-8429-7300
>
>
> > -----Original Message-----
> > From: Tyson Vanek [mailto:[EMAIL PROTECTED]]
> > Sent: 13 September 2001 23:35
> > To: CF-Talk
> > Subject: RE: Duplicate and StructCopy
> >
> >
> > Thanks for that, Ray. :) Actually, I only threw that in because I
> > run CF5, but figured many people on the list might run CF4. Good
> > catch, nonetheless.
> >
> > -Tyson
> >
> > -----Original Message-----
> > From: Raymond Camden [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, September 13, 2001 12:55 PM
> > To: CF-Talk
> > Subject: RE: Duplicate and StructCopy
> >
> >
> > > 19: <cflock scope="server" type="readonly" timeout="30">
> > > 20: <cfset intColdFusionVersion =
> > > listFirst(server.coldfusion.productversion)>
> > > 21: </cflock>
> > > 22:
> > > 23: <cfif intColdFusionVersion eq 5>
> > > 24: <cfdump var="#arrTest1#">
> > > 25: <hr>
> > > 26: <cfdump var="#arrTest2#">
> > > 27: <cfelse>
> > > 28: <cfoutput>
> >
> > An off topic comment on the code block above. Doing code like this,
> > where you have a code branch for CF5 and a code branch for <5, will
> > result in an error if you turn on strict attribute
> validation. We ran
> > across this in a Spectra template and had to move the CF5
> code into an
> > include. Like so:
> >
> > <CFIF CF5>
> > <CFINCLUDE ...>
> > <CFELSE>
> > old code
> > </CFIF>
> >
> > Just something to watch out for.
> >
> > ==============================================================
> > =========
> > Raymond Camden, Principal Spectra Compliance Engineer for Macromedia
> >
> > Email : [EMAIL PROTECTED]
> > Yahoo IM : morpheus
> >
> > "My ally is the Force, and a powerful ally it is." - Yoda
> >
> >
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists