0

I am trying to investigate a bug and am not super familiar with ColdFusion. There is a function call to isdefined(), which I believe should be isDefined(). What behavior does ColdFusion take if it runs into this kind of case discrepancy with a built-in function? Does it return truthy? Does it skip the statement?

The traceback shows the error coming from a line within this <cfif isdefined(...)> statement, so I'm wondering if the incorrect casing could be affecting this. Any thoughts?

Eric Dauenhauer
  • 710
  • 6
  • 23
  • 2
    What was the error? – Dan Bracuk Sep 23 '16 at 16:37
  • 8
    ColdFusion is not case sensitive so case should make no difference. Note `isDefined` requires a string not a variable. So if you want to know if the function/variable named `myFunction` is defined, you would call ``. I've made the dumb mistake before so just FYI. – Leeish Sep 23 '16 at 16:49

1 Answers1

6

What Leeish said. Function calls are NOT case sensitive. See CF documentation, the correct usage is IsDefined("variable_name")

If all else fails, post a bigger block of the code here and we'll see what we can do.

CF_HoneyBadger
  • 2,960
  • 2
  • 14
  • 16
  • 1
    Thank you, and thank you Leeish for the tip! The error report was not related to the `isdefined()` statement, I just wanted to check to see if that was part of what was causing it. I will continue my investigation elsewhere. – Eric Dauenhauer Sep 23 '16 at 18:04