As title stated, what is interesting is that (int) 0 will be rendered as true when atttrue is used.

Problem is the Boolean field of MySQL and Bit field of MS-SQL both returns 1 or 0, instead of true or false.
So regardless of actual value, that field is always true as far as atttrue is concerned, unless we do condition/formatting on either TBS or SQL.

This happens because 0 is casted to '0' at line #1390 after ope processing, before if.then.else processing, but also before att processing.
False is as expected, because it is converted to empty string. However att sees that '0' is non-empty and think it is true.

If this is not by design, would it be tricky to fix?

By: Skrol29

Date: 2013-09-14

Time: 22:59

Re: atttrue regards (int) 0 as 'true'.

Hi Sheepy,

Thank for the bug report and the nice precisions.

I think it will be fixed soon.
I beta is already n the road.

New message

Name:

Email:

ignore this line

Email:

-> No email accessible on Web pages.

Send replies notifications by email

Readers can contact you by Anti-Spam System (*)

Subject:

Message:

Special part in message: enter text between [code] and [/code] tags.

(*) Anti-Spam System: A reader can ask for 3 emails a day, no more ; and the reader must have a valid email to ask for emails.