[ingo] sieve: empty allof generates 'false' instead of 'true'

Chuck Hagenbuch chuck at horde.org
Sun Aug 27 22:38:00 PDT 2006


Quoting Riskó Gergely <gergely at risko.hu>:

> SSIA, but anyway:
> If I create a rule, where I choose to match every criteria I specify,
> but I specify not, then the generated code says 'if false' instead of
> 'is true'.  Please keep in mind, that in mathematics (and because of
> that in IT) "allof no conditions" evaluates to true, not to false.
> That is anyof, which evaluates to false.
>
> Patch againts CVS:
> --- lib/Script/sieve.php        2006-08-27 02:03:02.000000000 +0200
> +++ lib/Script/sieve.php.fixed  2006-08-27 02:02:47.000000000 +0200
> @@ -1249,7 +1249,7 @@
>          } elseif (count($this->_tests) == 1) {
>              $code = $this->_tests[0]->toCode();
>          } else {
> -            return 'false';
> +            return 'true';
>          }
>          return $code;
>      }
>
> BTW: the web frontend of your bts is unavailable for a week at least.

It is working fine. If you could attach this patch to a ticket there  
it would be greatly appreciated.

Thanks,
-chuck

-- 
"we are plastered to the windshield of the bus that is time." - Chris


More information about the ingo mailing list