CFQueryParam Scanner Broken on CF9

Server , Adobe , Tools of the Trade , ColdFusion Add comments

Just an FYI. I ran CFQueryParam Scanner (latest from RiaForge) on my local CF9 box, and got this error:

Invalid name for user-defined function.
The name Variables.Struct contains illegal characters.
The CFML compiler was processing:
* A cffunction tag beginning on line 4, column 2.
The error occurred in \qpscanner\index.cfm: line 4


  

I changed the function named "Variables.Struct" to "Variables_Struct" and ran it to get this error:
Variable STRUCT is undefined.
The error occurred in \qpscanner\index.cfm: line 16



4 responses to “CFQueryParam Scanner Broken on CF9”

  1. Peter Boughton Says:
    Argh! There's no reason that shouldn't work. :@

    The solution to this is to also assign Variables_Struct into Variables.Struct, like so:

    <cffunction name="Variables_Struct" returntype="Struct"><cfreturn Arguments/></cffunction>
    <cfset Variables.Struct = Variables_Struct />

    I'll double check that on other engines and commit the fix as soon as I can (probably be this evening).

    In future, please report problems like this using the "Contact Project" option on RIAForge, so that I can fix issues like this sooner.
  2. Peter Boughton Says:
    Also worth noting, you can probably fix this by switching all Struct() calls to the new inline struct notation - assuming you don't need backwards compatibility with other engines.
  3. Sami Hoda Says:
    Peter,

    I did use the "Contact Project" option. Looks like you never got my email, so I made this blog post. :)

    Look forward to your fix.
  4. Peter Boughton Says:
    Hmm, possibly there may be a problem with the contact form - couldn't see anything in spam, so I tried to send myself a message, and after 15 minutes it still hasn't arrived (but a separate test to same address has arrived).

Leave a Reply

Leave this field empty:



Powered by Mango Blog. Design and Icons by N.Design Studio