Συντάκτης: Exim Mailing List Ημερομηνία: Προς: exim-users Αντικείμενο: Re: [exim] More integer annoyances in 4.65
On Tue, Jan 02, 2007 at 09:51:25PM +0100, Jakob Hirsch wrote:
> The fix for your config would be:
> ${if >{${spam_score_int}0}{500}}
> ${if >{${acl_m}0}{1000}}
I see why that works, but that is really a hack IMO. The average user,
and perhaps the more advanced user, may not see that as an obvious
way to handle it.
> I agree the change for empty strings is very good. OTOH, using an empty
> string in integer comparisons is definitely a config flaw.
I disagree. I believe that casting is a useful construct if the behavior
is defined and can be depended on. Having a null value equate to 0
when cast to an integer is a sane and logical operation. Again, IMO.
However, I have no problems with the new implementation. The only issue
I have is two-fold:
1. There are integer variables that can have a blank value
2. There is no simple test to determine if a value is an integer
Adding those two should help users migrating to the new format.