Re: [exim] Possible bug -- def:acl_m0 operator misbehavior.

Góra strony
Delete this message
Reply to this message
Autor: Sam Michaels
Data:  
Dla: Philip Hazel
CC: exim-users
Temat: Re: [exim] Possible bug -- def:acl_m0 operator misbehavior.
On 6/7/05, Philip Hazel <ph10@???> wrote:
> It turns out that this is a very long-standing bug. The code thought
> that "0" should be treated as false for an "${if def:variable" test, but
> the documentation has never said this (I have checked back to release
> 1.62). Therefore, I have made the code agree with the documentation. The
> patch for 4.51 is below.


Perhaps comparison/def operators similar to PHP's "===" and "!=="
would be useful...they compare the type of variable in addition to its
value. If a function returns (int) 0--like the position of a
character in a string--it won't be interpreted as (boolean) false.