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

Riskó Gergely gergely at risko.hu
Sat Aug 26 17:03:19 PDT 2006


Hi,

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.

Thanks,
Gergely



More information about the ingo mailing list