tracker issue : CF-4119952

select a category, or use search below
(searches all categories and all time range)
Title:

Docs for booleanFormat are incorrect

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Peter Freitag / Peter Freitag (Peter Freitag)

Created: 02/19/2016

Components: Documentation

Versions: 2016

Failure Type:

Found In Build/Fixed In Build: CF2016_Final /

Priority/Frequency: Normal / All users will encounter

Locale/System: ALL / Mac 10 All

Vote Count: 3

Listed in the version 2016.0.02.299200 Issues Fixed doc
Verification notes: verified_fixed on July 07, 2020 using build 2016.0.02.299200
The adobe docs for `booleanFormat()` are incorrect, they say ?*Returns True, for a non-zero value; false for zero, false, and non-Boolean values, and an empty string ("").*? however `booleanFormat("bacon")` throws exception, interestingly `booleanFormat("")` returns `false` even though it is not a boolean either. 

<cfoutput>#booleanFormat('bacon')#</cfoutput>

cannot convert the value "bacon" to a boolean on line 1

http://trycf.com/gist/ec52f97ff037b87fadbb/acf2016

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	4119952

External Customer Info:
External Company:  
External Customer Name: Peter Freitag
External Customer Email:  
External Test Config: My Hardware and Environment details:

Attachments:

Comments:

@Pete: the "" thing is to keep it analogous to yesNoFormat() which also supports that for some reason. Coincidentally I was just updating cfdocs to reflect that! It was completely unrelated to seeing this ticket. Weird.
Comment by External U.
4575 | February 20, 2016 04:32:23 AM GMT
This needs reopening: * no mention that null is also a false value * this is incorrect: "A number or Boolean value." as the argument type. It's "a number, boolean value, empty string or null" * equivalently the Description is wrong on that count too, and it's just a wrong description anyhow. What does "it evaluates ~" mean? What it does is takes a value and returns "true" or "false" based on some loose interpretation as to to the truthiness or falsiness of the value. * it is *not* a mathematical function; see the categorisation of yesNoFormat() (which is also wrong, as it claims it's a decision function). It's simply a *formatting* function. * the example code has script comments in tag-based code! * no "History" section It's probably more wrong than it is right. Can you pls not be so half-arsed with your work, and do a thorough, professional job. Have some pride in your work :-|
Comment by External U.
4576 | February 24, 2016 02:07:43 AM GMT
Can we see what the changes are, before you claim they're "fixed"?
Comment by External U.
4577 | February 29, 2016 03:07:50 AM GMT
test note
Comment by CFwatson U.
4578 | June 07, 2016 04:19:19 AM GMT
The fix for this bug is available as part of the early-access build for ColdFusion 2016 Update 2.
Comment by CFwatson U.
4579 | June 07, 2016 04:26:13 AM GMT