Cannot convert the value "Not a boolean" to a boolean

Sample code

<cfset notABoolean = "Not a boolean">

<cfif notABoolean>
    <!--- Logic here --->
</cfif>

Explanation

The sample code is attempting to use the string "Not a boolean" in a place that expects something that will evaluate to true of false.

Submitted by Adrian Lynch on Wednesday 12 November 2008

Comments

Add a comment or subscribe to this error