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

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Sam Michaels
Date:  
À: Philip Hazel
CC: exim-users
Sujet: 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.